|
ToToTEK.COM Help & Support Forum
|
View previous topic :: View next topic |
Author |
Message |
slobu
Joined: 11 May 2012 Posts: 4
|
Posted: Fri May 11, 2012 5:41 pm Post subject: MD Pro Specific Code & TotoTek Stock |
|
|
Figured I'd kill two birds with one stone here.
First question is, does anyone have any resources for MD Pro Specific/Useful code? For instance: Using all 4 banks of SRAM in a single game? Is it possible for the Genesis 68000 to reprogram part of the flash? Basically using part of the flash for a giant sandbox type game?
The other question is: How does one order more than a dozen of these? Is the amount in stock currently the last?
Thanks in advance! |
|
Back to top |
|
|
MottZilla
Joined: 08 Sep 2004 Posts: 765
|
Posted: Sat May 12, 2012 4:41 pm Post subject: |
|
|
Private message Tomy and ask. But the stock number usually isn't the last. |
|
Back to top |
|
|
Chilly Willy
Joined: 08 Feb 2009 Posts: 174
|
Posted: Thu May 17, 2012 4:25 am Post subject: |
|
|
I once made some notes from the menu on how to change sram banks, and how to change the flash offset. Those are pretty simple, just don't remember offhand, I'd have to dig up my notes. You don't really want a game changing the flash much - flash has a finite life, so the more changes you make, the more likely a block will eventually fail. Think about firmware updates to things like the PSP - Sony never guaranteed a PSP would survive a single update... and a certain percentage of users report the PSP bricked after updating. Now these are SLIM odds, but the more you do it, the better the odds it will happen eventually.
So if a game might write flash once each time you play it, that would probably be okay. But you certainly wouldn't want to treat the flash like temp ram. |
|
Back to top |
|
|
slobu
Joined: 11 May 2012 Posts: 4
|
Posted: Thu May 17, 2012 2:47 pm Post subject: |
|
|
@Chilly Willy: So, you're saying the MD Pro does not have wear leveling? Can I also extrapolate that you think a Genesis binary could write to the flash?
Any advice on using all that sram would be awesome. I saw a little of your info on SegaExtreme. |
|
Back to top |
|
|
MottZilla
Joined: 08 Sep 2004 Posts: 765
|
Posted: Thu May 17, 2012 5:13 pm Post subject: |
|
|
MD Pro uses NOR flashrom. There is no such thing as wear leveling. You are thinking of NAND flash memory systems which do. NAND memory is not suitable for being the active program memory in a classic console like the Sega Genesis which needs much faster response time from the program memory than NAND memory can provide. |
|
Back to top |
|
|
Chilly Willy
Joined: 08 Feb 2009 Posts: 174
|
Posted: Fri May 18, 2012 4:23 am Post subject: |
|
|
Yeah, NOR flash is meant for using straight with CPUs. But it also doesn't have a lot of the bells and whistles NAND flash has to make it last longer.
Considering the MD-Pro uses writes to flash space to set the sram and flash banks, I don't think you can program the flash from the Genesis - the needed write cycles are co-opted for bank setting.
Here's the code that starts the game in flash:
Code: | 000AAC MOVE.B ($E000C7),D0
000AB2 ORI.B #$80,D0
000AB6 MOVE.B D0,($E01).W
000ABA MOVE.B ($E000C6),D0
000AC0 MOVE.B D0,($1FF1).W
000AC4 MOVEA.L #$A10000,A6
000ACA MOVE.B #0,(A6)+
000ACE MOVE.B #0,(A6)+
000AD2 MOVE.B #0,(A6)+
000AD6 MOVE.B #0,(A6)+
000ADA MOVE.B #0,(A6)+
000ADE MOVE.B #0,(A6)+
000AE2 MOVE.B #0,(A6)+
000AE6 MOVE.B #0,(A6)+
000AEA MOVE.B #0,(A6)+
000AEE MOVE.B #0,(A6)+
000AF2 MOVE.B #0,(A6)+
000AF6 MOVE.B #0,(A6)+
000AFA MOVE.B #0,(A6)+
000AFE MOVE.B #0,(A6)+
000B02 MOVE.B #0,(A6)+
000B06 MOVE.B #0,(A6)+
000B0A LEA (0).W,A0
000B0E MOVEA.L (A0),SP
000B10 LEA (4).W,A0
000B14 MOVEA.L (A0),A1
000B16 JMP (A1)
|
Notice the stores to $E01 and $1FF1? Those set your banks before they clear the IO registers and jump into the game, which is now at 0. I'm not sure what the granularity of the flash bank is. The sram bank granularity is 32K (occupies 64K of space).
$E01 is the sram bank control - you can tell that from this snippet:
Code: | 000A70 MOVE.B (A4)+,D0
000A72 MOVE.B D0,($E000C6)
000A78 MOVE.B (A4)+,D0
000A7A MOVE.B D0,($E000C7)
000A80 BTST #7,D0
000A84 BNE.B lbC000A8E
000A86 MOVE.B #1,($A130F1)
|
Notice how the value stored to $E000C7 (which is ram, just in a mirror location) is used to determine if $A130F1 is set to 1 - that is the Sega standard for enabling sram. Then look back at the first code and notice that $E000C7 is used to set $E01. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|