So how does a cartidge work, here is what i think:
Physically: The cart is connected to the cart-port, basically its just a bunch of pins that connect internally to other stuff
Emulated: The emulated console should expect those pins to connect(that would also give us the posibility to start the snes with no game in it, however useless that may be)
Physcially: The cart has a bunch of wires running to several chips, some of them are roms, i think the game roms are behind a memory mapper which redirects any incoming reads. i am not sure if the added chips are behind, infront or parallel to the memory mapper
NOTE! if my idea about the memory mapper is correct(as nintendo devs where free to use any combination of roms for the same data) that means that rom data does not have to be split up to be accurate
Emulated: the emulator would have a cart emulator, the mapper file would explain how the cart needs to be assembled phyisically. (physicaly it would look like an empty pcb when no game is loaded). The same datafile would tell the emulator to add another port, in this case the socket for a SuperFX chip, it would do the same for sram.
If what i just typed is true then:
-The actual current rom images are already hardware-accurate if they are headerless and unhacked.
-a small change to byuu's current pcb file suggestion would be enough to create an accurate datafile for the snes platform.
This would happen as soon as i load a cart:
Code: Select all
Emulator starts up cart-builder
*.pcb file tells cart-builder where to map the rom regions and sram regions
*.pcb file tells cart-builder that another port is availble, and that it should be filled with a special cpu(or whatnot)
Cart-Builder inserts fully built cart into the snes cart-port
Snes emulator Powers on itself and if mapped, any cpu's on the cart
The snes only talks to the pins, the cart does things among itself.
things would be no different for any other hardware, BS-X, Super Game Boy, they would just be more complex to map and open up more ports.