Question topic

Ask anything your want about Megadrive/Genesis programming.

Moderator: BigEvilCorporation

Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Question topic

Post 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 :D

OK, here I go:
  1. How do Fusion or Regen emulate SRAM? Do they treat it as slower than normal RAM or as fast as it?
  2. 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.
  3. On consoles that don't have the port #3 (the EXT port), what do you get if you try to read it?
  4. 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?
  5. 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).
  6. 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)
  7. 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 :P
Sik is pronounced as "seek", not as "sick".
Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Post 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 :)
Sik is pronounced as "seek", not as "sick".
TmEE co.(TM)
Very interested
Posts: 2452
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Re: Question topic

Post 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 :P
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.
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
Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: Question topic

Post 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 :P
Sik is pronounced as "seek", not as "sick".
HardWareMan
Very interested
Posts: 753
Joined: Sat Dec 15, 2007 7:49 am

Re: Question topic

Post 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. ;)
TmEE co.(TM)
Very interested
Posts: 2452
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) »

I need my cart to work with 32X too... so I can't do all kinds of stuff :)
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
Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Post 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 :P 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'
Sik is pronounced as "seek", not as "sick".
TmEE co.(TM)
Very interested
Posts: 2452
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post 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..
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
Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post 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.
Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Post 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 >_>
Sik is pronounced as "seek", not as "sick".
TmEE co.(TM)
Very interested
Posts: 2452
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post 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...
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
Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Post by Sik »

Sonic 3D just made the level select cheat completely dumb :P
Sik is pronounced as "seek", not as "sick".
AamirM
Very interested
Posts: 472
Joined: Mon Feb 18, 2008 8:23 am
Contact:

Post by AamirM »

Yes, I remember it happened on the first version of Regen that used my 68k core.
Chilly Willy
Very interested
Posts: 2993
Joined: Fri Aug 17, 2007 9:33 pm

Post 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 :P 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. :lol:
Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Post 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.
Sik is pronounced as "seek", not as "sick".
Locked