Custom cartridge - Needed signals and byte ordering

For anything related to cart (SRAM, SF2 mapper, audio, CD mode 1, ...)

Moderator: BigEvilCorporation

Post Reply
masteries
Very interested
Posts: 50
Joined: Thu Jul 30, 2020 3:33 pm

Custom cartridge - Needed signals and byte ordering

Post by masteries » Sun Oct 09, 2022 5:05 pm

Greetings,

We are planning to develop a custom cartridge,
with some embedded electronics to resemble
a ROM memory.

Writing is planned to be performed via address lines,
specific addresses act as commands, that provides x bits of data,
without use D0-D15 as input.
As well, data retrieval is performed normally.


From a 8 Megabytes linear cartridge schematic (no banking, read only),
we detectad that 23 address lines and 16 data lines are needed.

As well, as output strobe, the CAS0 signal is used.
and as chip enable, the ASEL is used.


We understand ASEL as address strobe signal
(the signal that indicates the address lines provide a stable value),

and CAS0 as output strobe,
(the signal that indicates the 16 output data needs to
be provided).



From other references, we read that the DTACK signal
needs to be addressed when the requested address
is beyond the first 4 MB... but the 8 MB linear
cartridge schematic doesn´t use the Data Acknowledge signal at all.


Also, for simplification, its possible to use only the ASEL signal
to read the requested address and provide ( some tens of nanoseconds after)
the 16 bit data, without use the CAS0 signal at all?


Image

The idea is to use the ASEL as address strobe, as CE signal in the
image (taken from a 32 Mbit EEPROM). Identify the requested address,
and put into D0-D15 the 16 bit data, until ASEL (CE in the image)
returns to High.

From documents we read that there are 200 ns from address strobe assertion
until the data is retrieved, in the Megadrive/Genesis.




As a second question, starting with an example:

If the console want to read from address (such address 0, is only an example);
the cartridge provides the bytes from address 0 and 1,
but in which order?

D0 to D7 - Byte at address 0
D8 to D15 - Byte at address 1

or reversal?

D0 to D7 - Byte at address 1
D8 to D15 - Byte at address 0


How are generated the binaries / ROM files from SGDK?
With correct order or we need to swap bytes?

The ROM file of the game, will be manually uploaded as a byte stream
to the custom controller, accesed as a "const unsigned char[8338608]"

Post Reply