I don't get it :pullhair: :pullhair:
TOSCOPY.PRG is run, it copys TOS206 space to $4F00000 (copy verified in STOS)
Then the PRG accesses 4F80000, which triggers copy_done to go high (also verified)
In main top I had to patch the RAM decode with & (TOSCE | ~copy_done | AS30);
which should make ram_decode =0 on TOSCE =0, copy_done =1, AS30 = 0
Code: Select all
assign TOSCE = ( A[29:20] != 10'hE & A[29:20] != 10'h3FE & A[29:3] != 27'h0 ) | ~RW30 | (AS30 & AS) ;
wire ram_disable = 1'b0; // 1 = disable TTRAM
wire ram_area = ((A[29:28] != 2'b00) | (A[27:24] == 4'b0000)) & (TOSCE | ~copy_done | AS30);
assign ram_decode = ram_disable ? 1'b1 : ram_area;
ram_decode is 0 on match
As when copy_done is high, and TOSCE = 0 , we are accessing ROM (which is now in TTram)
ram_decode going low also sets the CPU to 50mhz.
then in SDRAM module.
Code: Select all
// Address translation: Redirect TOS206 addresses to 0x4F00000-0x4F7FFFF
wire shadow_enable = copy_done & ~AS30 & ~TOSCE; // Enable for TOS206 addresses
wire [29:0] A_INT = shadow_enable ? {7'b0011110, A_IN[22:0]} : A_IN; // Translate to 0x4F00000
Basically "done"...
BUT it locks up when copy_done goes high, so I assume the address translation isn't working, or the CPU isn't in 50mhz mode during the shadow rom access. Or the idea simply doesn't work, or i've done something dumb.
I have the 16bit ROM disabled when copy_done = 1. The 536 databuffer is turned off. I even ignore STE ROM DTACK. I even stop the STE from seeing ROM access.. I even stop my own ROM DTACK from going going low (as it would likely conflict with the SDRAM logic STERM otherwise).
:shrug: :pullhair: :pullhair: :stars: :stars: :headbang:
:dizzy: