Page 32 of 57

Posted: Thu Aug 23, 2012 7:08 pm
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.

Posted: Fri Aug 24, 2012 8:36 am
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).

Posted: Wed Sep 05, 2012 5:49 pm
by bioloid
I can't find the setVBlankCallback/setHBlankCallback in the sdk, it has been removed/renamed ?

Posted: Wed Sep 05, 2012 5:52 pm
by bioloid
SYS_setVIntCallback ok!

Posted: Wed Sep 05, 2012 10:57 pm
by Stef
Yeah they have been renamed :p

Posted: Thu Sep 06, 2012 4:59 am
by lingh
Hey, what about save support in sgdk, is there any?
Can somebody write me example with SRAM?

Posted: Thu Sep 06, 2012 7:53 am
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

Posted: Thu Sep 06, 2012 10:14 am
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?

Posted: Thu Sep 06, 2012 10:40 am
by TmEE co.(TM)
interrupts
VBL (frame) and HBL (line)

Posted: Thu Sep 06, 2012 11:10 am
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?

Posted: Thu Sep 06, 2012 5:16 pm
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.

Posted: Thu Sep 06, 2012 5:56 pm
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).

Posted: Thu Sep 06, 2012 7:21 pm
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) :)

Posted: Thu Sep 06, 2012 7:44 pm
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 ?

Posted: Thu Sep 06, 2012 9:37 pm
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