Sega Genesis Dev Kit (SGDK)
Moderator: Stef
-
- Very interested
- Posts: 2993
- Joined: Fri Aug 17, 2007 9:33 pm
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
The current version does not have direct support for SRAM (the incoming one will have) but you can give a shot on this topic which explain how use SRAM with SGDK :
viewtopic.php?t=1227
viewtopic.php?t=1227
Ok, that was easy. My project seems to work fine.
http://www.mediafire.com/download.php?2kc1ckum0p5kef8
Am i understand all correct?
And i have 1 more question. In this thread people saying, what you cannot use sram in the game over 2 Mb. How exactly you can get around this?
http://www.mediafire.com/download.php?2kc1ckum0p5kef8
Am i understand all correct?
And i have 1 more question. In this thread people saying, what you cannot use sram in the game over 2 Mb. How exactly you can get around this?
I am total noob now in this, but what this ints exactly?you need to disable ints, turn on the sram, read/write it, turn off the sram, then enable ints.
-
- Very interested
- Posts: 2452
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
interrupts
VBL (frame) and HBL (line)
VBL (frame) and HBL (line)
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: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Exactly 
Use to prevent any VDP interrupt then use to re enable them. We don't care about the external interrupt.

Use
Code: Select all
SYS_setInterruptMaskLevel(7)
Code: Select all
SYS_setInterruptMaskLevel(3)
-
- Very interested
- Posts: 2993
- Joined: Fri Aug 17, 2007 9:33 pm
Unless you're using the light gun support in the controller code, then you need to use level 1, not level 3.Stef wrote:Exactly
Useto prevent any VDP interrupt then useCode: Select all
SYS_setInterruptMaskLevel(7)
to re enable them. We don't care about the external interrupt.Code: Select all
SYS_setInterruptMaskLevel(3)

Not a big deal... you'll know if you're using a light gun as you need to look if they're available and then set the controller support to turn on the gun(s).
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
External is not level 2 ? but as we don't need it we usually set mask interrupt to 3 (so horizontal interrupt are not masked)Chilly Willy wrote:Unless you're using the light gun support in the controller code, then you need to use level 1, not level 3.Stef wrote:Exactly
Useto prevent any VDP interrupt then useCode: Select all
SYS_setInterruptMaskLevel(7)
to re enable them. We don't care about the external interrupt.Code: Select all
SYS_setInterruptMaskLevel(3)
![]()
Not a big deal... you'll know if you're using a light gun as you need to look if they're available and then set the controller support to turn on the gun(s).

-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
I guess you are speaking about the default configuration in SGDK ?
Here're the infos taken from vdp.h file :
Here're the infos taken from vdp.h file :
Code: Select all
#define WPLAN 0xB000
#define HSCRL 0xB800
#define SLIST 0xBC00
#define APLAN 0xC000
#define BPLAN 0xE000