cafe-alpha
Established Member
Hello and happy new year
I am currently trying to add and use 128KB SRAM chip to a modified USB dev cart.
(The reason to add SRAM is to use it in order to store temporary data for another module on the cartridge, not described here.)
I use a Cypress 128KB, 16 bits SRAM chip.
You can find the cartridge schematics here.
As suggested in the schematics, the SRAM chip is mapped to A-bus CS0 space, from offset 700000h.
I can nearly use the SRAM data, but got problem when writing char (1 byte sized) data to the chip, as described in the test results below.
Notes:
- All data are in hexadecimal representation and start address used for testing is 02700000 (= top of SRAM data).
- I had similar test results for 2 Saturn units (modchipped white Saturn and gray Saturn, both japanese model), so the problem should not be due to a defective Saturn unit.
Test #1 : long data write.
Write of 01234567 89abcdef to SRAM
Test #2 : char/word/long bytes data read
Test #3 : short data write.
Write of 9876 5432 10fe dcba to SRAM
Test #4 : char data write.
Write of 78 9a bc de f0 12 34 56 to SRAM
It seems that writing data to even address doesn't modify anything, and that writing data to odd address sets previous byte to FF or same value as data at odd address.
It think the culprit is SCU, who is messing up when writing 8 bit data to 16 bit bus, but I can't find details about this problem, and ... don't know what should I do in order to fix it.
Does anyone got an idea of the origin of the problem, and any hardware countermeasure to it ? (It is OK to modify the schematics, SRAM chip type, etc.)
I am currently trying to add and use 128KB SRAM chip to a modified USB dev cart.
(The reason to add SRAM is to use it in order to store temporary data for another module on the cartridge, not described here.)
I use a Cypress 128KB, 16 bits SRAM chip.
You can find the cartridge schematics here.
As suggested in the schematics, the SRAM chip is mapped to A-bus CS0 space, from offset 700000h.
I can nearly use the SRAM data, but got problem when writing char (1 byte sized) data to the chip, as described in the test results below.
Notes:
- All data are in hexadecimal representation and start address used for testing is 02700000 (= top of SRAM data).
- I had similar test results for 2 Saturn units (modchipped white Saturn and gray Saturn, both japanese model), so the problem should not be due to a defective Saturn unit.
Test #1 : long data write.
Write of 01234567 89abcdef to SRAM
Before : 5A49C04A 125601E5
After : 01234567 89ABCDEF (no problem)
Test #2 : char/word/long bytes data read
// (*(volatile unsigned char *)(0x02700000)) = 0x01;
// (*(volatile unsigned short *)(0x02700000)) = 0x0123;
// (*(volatile unsigned long *)(0x02700000)) = 0x01234567;
-> no problem
Test #3 : short data write.
Write of 9876 5432 10fe dcba to SRAM
Before : 0123 4567 89AB CDEF
After : 9876 5432 10FE DCBA (no problem)
Test #4 : char data write.
Write of 78 9a bc de f0 12 34 56 to SRAM
Before : 98 76 54 32 10 FE DC BA
After : FF 9A FF DE 12 12 FF 56 (problem on even address)
It seems that writing data to even address doesn't modify anything, and that writing data to odd address sets previous byte to FF or same value as data at odd address.
It think the culprit is SCU, who is messing up when writing 8 bit data to 16 bit bus, but I can't find details about this problem, and ... don't know what should I do in order to fix it.
Does anyone got an idea of the origin of the problem, and any hardware countermeasure to it ? (It is OK to modify the schematics, SRAM chip type, etc.)