Page 1 of 2
Question topic
Posted: Tue Apr 22, 2008 2:28 am
by Sik
OK, since I don't want to flood the forum with a lot of topics, I made this one where I'll put all the generic questions I have about the Mega Drive, OK? Feel free to ask your own questions too, let's make this a researching topic if you want
OK, here I go:
- How do Fusion or Regen emulate SRAM? Do they treat it as slower than normal RAM or as fast as it?
- Do Fusion and Regen (didn't check if Regen has BIOS support) treat the BIOS as being always 8KB or they go by the BIOS ROM size? Because I would want to make a BIOS that would be surely bigger than 8KB.
- On consoles that don't have the port #3 (the EXT port), what do you get if you try to read it?
- Reading the $400000-$7FFFFF area generates a signal that is normally not used for addressing. Would it be possible to use it as an extra address line to access 8MB?
- The cartridge can generate the !DTACK signal. Would it be possible to enable the $800000-$9FFFFF as a ROM area with it? (this combined with the above would in fact allow the UMKT hack to work on the real hardware).
- What format does the Mega Drive use when the ports are in serial mode? (by format I mean the encoding, e.g. 8n1) It doesn't seem to be possible to change it, through if it is, tell me! (the serial mode is almost not documented, really)
- VDP's mode 4 uses two registers (8 and 9 if I'm not mistaken) for scrolling. Mode 5 uses the scroll tables for scrolling instead, but do those registers have some effect still? Registers are in the internal VDP memory and don't go through the FIFO, so often the values set there have effect even if changed in the middle of a scanline. If those registers still do something, we could do horizontal stretching of the scroll or something.
In addition to all the above, I would want to see what's in the $AXXXXX area. There's a lot of stuff there that is used only by few games, or even just one. I already have the stuff documented in the main manual, the Sega CD and the 32x addresses, so discard them. And more questions when they come to my mind

Posted: Wed Apr 30, 2008 4:27 pm
by Sik
>_>
Adding question by the way: can somebody confirm me if changing the scrolling registers (VDP mode-4) in the middle of a scanline works? I know some work (like the backdrop color register), some don't (like the enable display setting). I want to know if those do (the scrolling circuit shouldn't be too complex so it may work). If that's the case then I could stretch images horizontally too

Re: Question topic
Posted: Wed Apr 30, 2008 6:33 pm
by TmEE co.(TM)
How do Fusion or Regen emulate SRAM? Do they treat it as slower than normal RAM or as fast as it?
You need to write $01 to $A1301F (well, $A13000...$A130FF) to enable SRAM at $200000....$20FFFF. Beware, only 64KB SRAM, 2MBytes SHOULD be emulated (only emu that does it is Genecyst). The speed SHOULD be treated as same.
Do Fusion and Regen (didn't check if Regen has BIOS support) treat the BIOS as being always 8KB or they go by the BIOS ROM size? Because I would want to make a BIOS that would be surely bigger than 8KB.
The BIOS is only 2KB big, and Fusion doesn't care about the size AFAIK, I once made my own TMSS ROM, and it would have worked (boot the cart)if had been a bit smarter when I did it.
On consoles that don't have the port #3 (the EXT port), what do you get if you try to read it?
Probably same as form a uninitialized controller port... I don't know what the value is, if there is any value... and if no port HW is included, probably an $FF.
Reading the $400000-$7FFFFF area generates a signal that is normally not used for addressing. Would it be possible to use it as an extra address line to access 8MB?
If the signal is from $000000...$7FFFFF you could....
The cartridge can generate the !DTACK signal. Would it be possible to enable the $800000-$9FFFFF as a ROM area with it? (this combined with the above would in fact allow the UMKT hack to work on the real hardware).
Cartridge doesn't create that signal, and you can't use that area, and if you can, you can't use it with 32X AFAIK....
What format does the Mega Drive use when the ports are in serial mode? (by format I mean the encoding, e.g. 8n1) It doesn't seem to be possible to change it, through if it is, tell me! (the serial mode is almost not documented, really)
Don't know anything...
VDP's mode 4 uses two registers (8 and 9 if I'm not mistaken) for scrolling. Mode 5 uses the scroll tables for scrolling instead, but do those registers have some effect still? Registers are in the internal VDP memory and don't go through the FIFO, so often the values set there have effect even if changed in the middle of a scanline. If those registers still do something, we could do horizontal stretching of the scroll or something
nope, no effect as far as I remember form CMD's VDP doc... I may be wrong...
In addition to all the above, I would want to see what's in the $AXXXXX area. There's a lot of stuff there that is used only by few games, or even just one. I already have the stuff documented in the main manual, the Sega CD and the 32x addresses, so discard them. And more questions when they come to my mind

Access of A13000...A130FF pulses the !TIME signal on cartslot, I don't know about anything else... its the only signal that I care about.
Re: Question topic
Posted: Wed Apr 30, 2008 6:38 pm
by Sik
TmEE co.(TM) wrote:How do Fusion or Regen emulate SRAM? Do they treat it as slower than normal RAM or as fast as it?
You need to write $01 to $A1301F (well, $A13000...$A130FF) to enable SRAM at $200000....$20FFFF. Beware, only 64KB SRAM, 2MBytes SHOULD be emulated (only emu that does it is Genecyst). The speed SHOULD be treated as same.
Only 64KB? Aw.
TmEE co.(TM) wrote:Do Fusion and Regen (didn't check if Regen has BIOS support) treat the BIOS as being always 8KB or they go by the BIOS ROM size? Because I would want to make a BIOS that would be surely bigger than 8KB.
The BIOS is only 2KB big, and Fusion doesn't care about the size AFAIK, I once made my own TMSS ROM, and it would have worked (boot the cart)if had been a bit smarter when I did it.
I wonder why I always mix the values (2KB = 0x800)
TmEE co.(TM) wrote:Reading the $400000-$7FFFFF area generates a signal that is normally not used for addressing. Would it be possible to use it as an extra address line to access 8MB?
If the signal is from $000000...$7FFFFF you could....
No, from $400000..$7FFFFF, but you could OR it with the normal signal from $00000..$3FFFFF. No idea if a NOT should go in the way, but you get the idea

Re: Question topic
Posted: Thu May 01, 2008 5:56 am
by HardWareMan
TmEE co.(TM) wrote:The cartridge can generate the !DTACK signal. Would it be possible to enable the $800000-$9FFFFF as a ROM area with it? (this combined with the above would in fact allow the UMKT hack to work on the real hardware).
Cartridge doesn't create that signal, and you can't use that area, and if you can, you can't use it with 32X AFAIK....
Usual simple cartrige - don't, special cartrige - does.

Posted: Thu May 01, 2008 10:31 am
by TmEE co.(TM)
I need my cart to work with 32X too... so I can't do all kinds of stuff

Posted: Thu May 01, 2008 1:45 pm
by Sik
I saw normal cartridges failing to run on the 32x (one Sonic 3D cart from a friend doesn't run on the 32x with good video while without it it's all OK, while normally Sonic 3D doesn't get affected). Simply you can't expect a non-32x game running with the 32x attached. Same goes with the Sega CD, don't expect a non-CD game to run with the Sega CD powered on

In most of the cases it will work, but that doesn't mean always. The 32x is more sensible in this matter through. It seems to filter out most cartridge pins or something o_O'
Posted: Thu May 01, 2008 4:29 pm
by TmEE co.(TM)
Sonic3D cart is kinda special though... its PCB is a bit thinner, and prone to glithes when you say hit the cart while the game runs... you will most likely get a "you have found a secret"(or something) screen (so you would not get pissed)... and 32X does filter out many pins... I'll get one sometime, so I can do more tests..
Posted: Thu May 01, 2008 4:43 pm
by Shiru
I don't think that board of Sonic 3D is different from other carts. Unlicensed copies of this game had same feature - if cart is hit, secret menu often appears. There is no reason for pirates to use different board just for this one game.
Posted: Thu May 01, 2008 5:15 pm
by Sik
That screen appears because the vectors for the exception interrupts are set to a subroutine that goes to the level select, nothing more >_>
Posted: Thu May 01, 2008 5:21 pm
by TmEE co.(TM)
The board should not have more than a 32Mbit ROM on it... and what Sik said is correct. Other games would just crash or display some error, S3D presents you with something so you would not be pissed...
Posted: Thu May 01, 2008 7:29 pm
by Sik
Sonic 3D just made the level select cheat completely dumb

Posted: Thu May 01, 2008 8:06 pm
by AamirM
Yes, I remember it happened on the first version of Regen that used my 68k core.
Posted: Thu May 01, 2008 9:04 pm
by Chilly Willy
Sik wrote:I saw normal cartridges failing to run on the 32x (one Sonic 3D cart from a friend doesn't run on the 32x with good video while without it it's all OK, while normally Sonic 3D doesn't get affected). Simply you can't expect a non-32x game running with the 32x attached. Same goes with the Sega CD, don't expect a non-CD game to run with the Sega CD powered on

In most of the cases it will work, but that doesn't mean always. The 32x is more sensible in this matter through. It seems to filter out most cartridge pins or something o_O'
Funny, I have both the 32X and CD attached and powered all the time, and have never run into a single game that is affected. My only concern I've run into is that with the 32X plugged in, the Sonic & Knuckles cart with another cart plugged in is so tall it barely fits in the space I have for the console.

Posted: Thu May 01, 2008 9:34 pm
by Sik
In theory, all games work even with the MCD and the 32x attached. However, if a specific game doesn't work with them, don't get surprised, that's what I mean. I think the main reason all games (except VR) work with the 32x is because they don't have any oddities. If the MD was like the SNES and almost all games had custom hardware, definitely they wouldn't work with the 32x, because it takes control over most of the special pins.