Sega Genesis Dev Kit (SGDK)

SGDK only sub forum

Moderator: Stef

Chilly Willy
Very interested
Posts: 2993
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy »

I'd add the directories to the dependencies, then have one rule to make them. If they exist, the dependencies are met and the rule isn't used; if they don't, the rule creates them.
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef »

Not sure if that work but i should try :) I agree the way i did in the makefile is not very elegant but i could not figure any other way to do what i want to do (basically having all object files in separate "out" directory).
bioloid
Very interested
Posts: 184
Joined: Fri May 18, 2012 8:22 pm

Post by bioloid »

I can't find the setVBlankCallback/setHBlankCallback in the sdk, it has been removed/renamed ?
bioloid
Very interested
Posts: 184
Joined: Fri May 18, 2012 8:22 pm

Post by bioloid »

SYS_setVIntCallback ok!
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef »

Yeah they have been renamed :p
lingh
Interested
Posts: 20
Joined: Thu Sep 06, 2012 4:57 am

Post by lingh »

Hey, what about save support in sgdk, is there any?
Can somebody write me example with SRAM?
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef »

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
lingh
Interested
Posts: 20
Joined: Thu Sep 06, 2012 4:57 am

Post by lingh »

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?
you need to disable ints, turn on the sram, read/write it, turn off the sram, then enable ints.
I am total noob now in this, but what this ints exactly?
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) »

interrupts
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
lingh
Interested
Posts: 20
Joined: Thu Sep 06, 2012 4:57 am

Post by lingh »

TmEE co.(TM) wrote:interrupts
VBL (frame) and HBL (line)
Ok, i found function void SYS_setInterruptMaskLevel (u16 value) in documentation.
So i need to disable this Vertical interrupt (V-INT) Horizontal interrupt (H-INT) interrupts?
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef »

Exactly :)
Use

Code: Select all

SYS_setInterruptMaskLevel(7)
to prevent any VDP interrupt then use

Code: Select all

SYS_setInterruptMaskLevel(3)
to re enable them. We don't care about the external interrupt.
Chilly Willy
Very interested
Posts: 2993
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy »

Stef wrote:Exactly :)
Use

Code: Select all

SYS_setInterruptMaskLevel(7)
to prevent any VDP interrupt then use

Code: Select all

SYS_setInterruptMaskLevel(3)
to re enable them. We don't care about the external interrupt.
Unless you're using the light gun support in the controller code, then you need to use level 1, not level 3. :D

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).
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef »

Chilly Willy wrote:
Stef wrote:Exactly :)
Use

Code: Select all

SYS_setInterruptMaskLevel(7)
to prevent any VDP interrupt then use

Code: Select all

SYS_setInterruptMaskLevel(3)
to re enable them. We don't care about the external interrupt.
Unless you're using the light gun support in the controller code, then you need to use level 1, not level 3. :D

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).
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) :)
bioloid
Very interested
Posts: 184
Joined: Fri May 18, 2012 8:22 pm

Post by bioloid »

about, HBlank method: 0x40000010 is used to set APLAN scrolling on the GFX_CTRL_PORT, what's the address of the BPLAN please ?
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef »

I guess you are speaking about the default configuration in SGDK ?
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
Post Reply