wait states

Ask anything your want about the 32X Mushroom programming.

Moderator: BigEvilCorporation

Post Reply
tomaitheous
Very interested
Posts: 256
Joined: Tue Sep 11, 2007 9:10 pm

wait states

Post by tomaitheous » Thu Nov 13, 2008 3:41 am

I'm curious if there's a way to halt the 68k to eliminate the additional wait states on the 32x side form accessing the bus. Somehow halt the 68k after the 32x initialize process? Be it hardware or not.

Or if there are any regions/areas in the address range that are remapped from the 32x unit when it is initialized - since it *is* the pass through for the cartridge. For the same idea above - to have access to ram/rom on the cart at same speed as internal SDRAM.

8bitwizard
Very interested
Posts: 159
Joined: Sat Feb 24, 2007 11:35 pm
Location: San Antonio, TX

Post by 8bitwizard » Thu Nov 13, 2008 6:44 am

I suppose if you really want to halt the 68K, just have it read an address space that doesn't provide DTACK.

But on an emulator or on hardware modified to provide BERR it probably won't work.

Nemesis
Very interested
Posts: 791
Joined: Wed Nov 07, 2007 1:09 am
Location: Sydney, Australia

Post by Nemesis » Thu Nov 13, 2008 8:08 am

Execute an M68000 STOP opcode (0x4E72). While the M68000 is in a stopped state, it won't access the bus. Execution only resumes when an interrupt occurs.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: wait states

Post by Stef » Thu Nov 13, 2008 10:32 pm

tomaitheous wrote:...
For the same idea above - to have access to ram/rom on the cart at same speed as internal SDRAM.
You won't have access to rom on the cart at same speed as internal SDRAM whatever you do. The ROM is 16 bits and very slow when you compare it to the SH2 memory capabilities. You should never avoid as most as possible to access ROM when you're doing "in-game" processing. The normal way is to load ROM data into SDRAM before a level start then never access ROM at "in-game" time.
DOOM actually reads ROM data during 3D rendering, even worst it fetch its code from ROM, that partially explains the poor frame rate obtained...

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Fri Nov 14, 2008 1:44 am

That's understandable - DOOM has WAAAAAAAAY too much data to fit hardly any into SDRAM. I'm fairly certain the only thing in SDRAM is probably screen buffers (DOOM uses more than 2) and sound buffers. The DOOM executable wouldn't even fit in the SDRAM. A small level MIGHT fit in the SDRAM (just the level data, not the patches, flats, sprites, or sounds).

That's the biggest problem when making a DOOM conversion for the 32X - severe lack of RAM. Most console make up for that by leaving code and most data in the ROM. Just the variables and buffers go into RAM.

tomaitheous
Very interested
Posts: 256
Joined: Tue Sep 11, 2007 9:10 pm

Post by tomaitheous » Fri Nov 14, 2008 7:46 pm

Damn, that's right. The external bus is only 16bits wide.

Anyone have a nice opcode decoding chart for the sh2's?

Snake
Very interested
Posts: 206
Joined: Sat Sep 13, 2008 1:01 am

Re: wait states

Post by Snake » Fri Nov 14, 2008 9:00 pm

Stef wrote:You won't have access to rom on the cart at same speed as internal SDRAM whatever you do. The ROM is 16 bits and very slow when you compare it to the SH2 memory capabilities.
Yep. It's also much slower than the SDRAM anyway, so even if it were 32 bits, it'd still be slower.

Besides, I'm fairly certain that when the SH2s are reading ROM the 68K gets pushed aside, so there's no benefit in trying to stop the 68K.
Stef wrote:The normal way is to load ROM data into SDRAM before a level start then never access ROM at "in-game" time.
Actually I think most games access ROM during the game. It's not too bad, unless...
Stef wrote:fetch its code from ROM
Erk... that's nasty. I'm also pretty sure Sega tell you this is not allowed :) So DOOM is a bit naughty.
Stef wrote:that partially explains the poor frame rate obtained...
Maybe, yeah. Still, I never understood why DOOM had such a small screen and such a low framerate. It should run way better than it did on a 486.

tomaitheous
Very interested
Posts: 256
Joined: Tue Sep 11, 2007 9:10 pm

Post by tomaitheous » Fri Nov 14, 2008 9:30 pm

It's also much slower than the SDRAM anyway, so even if it were 32 bits, it'd still be slower.
I take it then any access to the rom from the 32x is hard coded for slower memory interface than(fixed wait states)? That seems bazaar that they would not have a system/setting to change the wait states for faster ROMs.

Edit: Man.. I didn't see that the sVDP buffer has a latency of 3 cycles. Things are really looking bad on this design...

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Sat Nov 15, 2008 4:34 pm

SH2s were just too fast for the rest of 32X...
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Post Reply