Mirrored memory areas
Moderator: Mask of Destiny
-
- Very interested
- Posts: 292
- Joined: Sat Apr 21, 2007 1:14 am
Mirrored memory areas
Just looking around with a Sega CD attached. On the Genesis side:
$440000-$5FFFFF repeatedly mirrors the $400000-$43FFFF area. (7 copies of Boot ROM / PRG RAM)
$640000-$7FFFFF repeatedly mirrors the $600000-$63FFFF area. (7 copies of Word RAM)
$A12040-$A120FF repeatedly mirrors the $A12000-$A1203F area. (3 copies of SCD registers)
So there are really no open areas to map things to when the Sega CD is plugged in, because of the incomplete address decoding it's completely filled up.
With no Sega CD attached you can still access $A12000-$A120FF but you read an open bus value.
$440000-$5FFFFF repeatedly mirrors the $400000-$43FFFF area. (7 copies of Boot ROM / PRG RAM)
$640000-$7FFFFF repeatedly mirrors the $600000-$63FFFF area. (7 copies of Word RAM)
$A12040-$A120FF repeatedly mirrors the $A12000-$A1203F area. (3 copies of SCD registers)
So there are really no open areas to map things to when the Sega CD is plugged in, because of the incomplete address decoding it's completely filled up.
With no Sega CD attached you can still access $A12000-$A120FF but you read an open bus value.
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
-
- Very interested
- Posts: 292
- Joined: Sat Apr 21, 2007 1:14 am
Good question! Bit 5 of $A10001 ("DISK") is '0' when the Sega CD is plugged in and '1' when it isn't.Chilly Willy wrote:Good to know. Is there any ID bit set for the CD? I noticed the other day that there's an ID bit for the FDD in $A10001. There's also a reserved bit there.
For example on a Genesis 2, the register is $81 with the Sega CD plugged in and $A1 otherwise.
The manual says this is the floppy disk drive presence detection bit, so it makes sense they re-purposed it for the Sega CD. Still wish there was some prototype floppy HW though.
Edit: I guess just to be clear I should state the mirrored areas apply to $000000-$3FFFFF when the CART pin isn't being grounded.
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
-
- Very interested
- Posts: 2442
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
It is called the floppf bit, and it goes to a signal on the EXP slot that MCD grounds.
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
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
-
- Very interested
- Posts: 292
- Joined: Sat Apr 21, 2007 1:14 am
I think there's like one blurry picture of a FDD unit for the MegaDrive at some CES show way back when. I also remember reading an interview that said it was a Sega of America staff member who really pushed for the FDD interface and successfully lobbied SOJ to add it, as bizarre as that sounds. As far as I know it's about as real as the SNES CD.Chilly Willy wrote:I thought there was a floppy for the Genesis... must be thinking of something else.
There is a rare but commercially released disk drive peripheral for the Sega Saturn at least.
I was just looking at that Mode 1 CD player the other day, I noticed you didn't have to do that reset sequence that's listed in the manual:Okay, that is also good to know. There's a way to detect the CD. I need to add that to my mode 1 code. No need to try and initialize a CD that isn't present.
Code: Select all
move.w #$FF00, $A12002
move.b #$03, $A12001
move.b #$02, $A12001
move.b #$00, $A12001
That demo was really cool btw, I was thoroughly impressed.
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
It was added when we were trying to get the Laser-Active/X-Eye/Wonderthingy working. It may not be needed, but it doesn't hurt.Charles MacDonald wrote: I was just looking at that Mode 1 CD player the other day, I noticed you didn't have to do that reset sequence that's listed in the manual:
I was looking at a BIOS disassembly and it isn't done there either. I guess it isn't necessary?Code: Select all
move.w #$FF00, $A12002 move.b #$03, $A12001 move.b #$02, $A12001 move.b #$00, $A12001
That demo was really cool btw, I was thoroughly impressed.
Re: Mirrored memory areas
thanks for confirmingCharles MacDonald wrote:Just looking around with a Sega CD attached. On the Genesis side:
$440000-$5FFFFF repeatedly mirrors the $400000-$43FFFF area. (7 copies of Boot ROM / PRG RAM)
$640000-$7FFFFF repeatedly mirrors the $600000-$63FFFF area. (7 copies of Word RAM)
$A12040-$A120FF repeatedly mirrors the $A12000-$A1203F area. (3 copies of SCD registers)
So there are really no open areas to map things to when the Sega CD is plugged in, because of the incomplete address decoding it's completely filled up.
With no Sega CD attached you can still access $A12000-$A120FF but you read an open bus value.
I indeed noticed Flux was accessing 128KB BOOTROM at $440000-$45FFFF instead of $400000-$41FFFF
For completeness, what is returned in $A12030-$A1203F (and mirrored) area(s) ?
-
- Very interested
- Posts: 292
- Joined: Sat Apr 21, 2007 1:14 am
Re: Mirrored memory areas
They are always zero, and I'm sure they are a mirror of the communication registers at offsets 20-2D. I need to get software running on the sub-CPU side so I can write a pattern and check it on the Genesis side, but I've been having some trouble with that. Wish I had a more concrete answer for you.For completeness, what is returned in $A12030-$A1203F (and mirrored) area(s) ?
Something i noticed while studying the recently scanned Mega CD tech manuals (for both models): SUB CPU only has VA1-VA19 connected to the Gate Array, which means that only 1MB area can be decoded, i.e internal backup RAM, PCM chip & "registers" should in theory be accessible from $0E0000-$0FFFFF as well (not just $FE0000-$FFFFFF as described in the official doc), and the first MB mapped area actually mirrored 16 times...
Nothing really important but still interesting to know.
Nothing really important but still interesting to know.