Code: Select all
wire shadow_enable = copy_done & ~TOSCE_RAW; //& ~AS30 Enable for TOS206 addresses
//When shadow_enable is high and A_IN is in the 0xE00000 - 0xEFFFFF range,
//A_IN = 0xE00000 ? A_INT = 0x04F00000
//A_IN = 0xEFFFFF ? A_INT = 0x04FFFFFF
//A_IN = 0xExxxxx ? A_INT = 0x04Fxxxxx
wire [29:0] A_INT = (shadow_enable && (A_IN[29:20] == 10'h038)) ? {10'h04F, A_IN[19:0]} : A_IN;
Copy $Exxxxx to $4Fxxxxx works. Verified in STOS and asm copy program
copy_done bit goes high then locks up
A_IN is the 68030 address bus. Routed though A_INT. Normal TTram works fine.
Slowed down A_INT by 1 clock and TTram still works fine. so didn't appear to be a delay problem on the address bus.
tried slowing down STERM and forcing it low on shadow access.. no change.
ram_decode (TTram) when Low sets the CPU to high-speed, I have a clause in that for TOS ROM decode.
So the ST RAM module will still trigger, and the address gets translated so as far as anything is concerned in the ST RAM module,
it is simply accessing $4Fxxxxx. The CPU still things this accessing $E00000
Ram_decode isolates the STE bus from the CPU anyway. it also puts the CPU into 50MHz mode.
I've also prevented the STE from seeing any ROM access.. even gated DTACK from reaching the CPU. (generated my own, also gated)
So CPU accesses $Exxxxx, address gets translated to $4Fxxxxx, SDRam decodes the address as normal, issues STERM - done.
ROM is isolated from the CPU bus anyway.
But when copy_done goes high, it just locks right up

- IMG_3181.JPG (28.87 KiB) Viewed 1136 times
At that point is simply accesses $4F80000 to trigger copy_done in the firmware.
The programme next should simply say press any key to continue but it doesn't get that far..
Also realise that all the AI models don't understand verilog for some reason. BUT the GPT coding module seems to "get it". But that concluded "it should work"
If I force my copy_done flag to zero, everything works as it should. So its not like i've seriously broken the SDRAM code. I've basically done almost nothing other than what I posted above and the copy_done code.
My only thought is the address translation line just doesn't do what I think it's doing
EMUTOS doesn't list any errors, just as shown in the image. STOS, if I copy the ROM , then PEEK $4F80000 to set copy_done, STOS just across "bus error" constantly. So its like my shadow ROM simply isn't working.....