Jump to content



0

PAL60 & NTSC in one .asm file?


3 replies to this topic

#1 eshu OFFLINE  

eshu

    Chopper Commander

  • 163 posts

Posted Fri Jan 8, 2010 5:57 AM

Hi,

I would like to work with one .asm file for both PAL60 & NTSC versions - I was hoping someone who understands DASM macros might be able to suggest how to go about this.

I would like to be able to do something like:

DEF NTSC
;DEF PAL

IFDEF NTSC
Var1 = $1
Var2 = $2
ENDIF

IFDEF PAL
Var1 = $99
Var2 = $9A
ENDIF

I hope this makes sense, and any help would be greatly appreciated...

#2 eshu OFFLINE  

eshu

    Chopper Commander

  • 163 posts

Posted Fri Jan 8, 2010 7:33 AM

View Posteshu, on Fri Jan 8, 2010 5:57 AM, said:

Hi,

I would like to work with one .asm file for both PAL60 & NTSC versions - I was hoping someone who understands DASM macros might be able to suggest how to go about this.

I would like to be able to do something like:

DEF NTSC
;DEF PAL

IFDEF NTSC
Var1 = $1
Var2 = $2
ENDIF

IFDEF PAL
Var1 = $99
Var2 = $9A
ENDIF

I hope this makes sense, and any help would be greatly appreciated...

Found some documentation at: http://www.macs.hw.a...holar/dasm.html

I think I can do:

SMODE EQU 0; 0-NTSC, 1-PAL60

...

IF SMODE=0
...NTSC Code...
ELSE
...PAL60 Code...
ENDIF

#3 SpiceWare OFFLINE  

SpiceWare

    Quadrunner

  • 5,989 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Mon Jan 11, 2010 2:25 PM

The following is what I did in Medieval Mayhem, you can get the source in blog if you're interested (scroll down to the entry titled Take 4 for the current source)

NTSC            = 0
PAL             = 1
COMPILE_VERSION = NTSC

...

 IF COMPILE_VERSION = NTSC
ShieldColor1 = $62 ; Purple
ShieldColor2 = $c8 ; Green
ShieldColor3 = $44 ; Red
ShieldColor4 = $86 ; Blue

WallColor0 = $22
WallColor1 = $24
WallColor2 = $26
WallColor3 = $28
WallColor4 = $2a
WallColor5 = $2c
MenuColor  = $B8 ; Teal
ValueColor = $68 ; Purple
SlctMenuColor = $FE ; Yellow
SlctBackground = $04 ; Grey
WingColor      = $1c ; Gold
BodyColor      = $42 ; Red
OVERSCAN_DELAY = $1b
FIREBALL_DELAY = 70 ; 75 second delay for launch of extra fireball
                    ; (delay * 60) / 64
ATTRACT_DELAY = 19 ; 20 second delay for going into Attract Mode
 ELSE
ShieldColor1 = $a2 ; Purple
ShieldColor2 = $58 ; Green
ShieldColor3 = $64 ; Red
ShieldColor4 = $d6 ; Blue
WallColor0 = $42
WallColor1 = $44
WallColor2 = $46
WallColor3 = $48
WallColor4 = $4a
WallColor5 = $4c
MenuColor  = $78 ; Teal
ValueColor = $C8 ; Purple
SlctMenuColor = $2E ; Yellow
SlctBackground = $04 ; Grey
WingColor      = $2C ; Gold
BodyColor      = $62 ; Red
OVERSCAN_DELAY = $57
FIREBALL_DELAY = 59 ; 75 second delay for launch of extra fireball
                    ; (delay * 50) / 64
ATTRACT_DELAY = 16  ; 20 second delay for going into Attract Mode
 ENDIF


#4 eshu OFFLINE  

eshu

    Chopper Commander

  • 163 posts

Posted Tue Jan 12, 2010 5:17 AM

View PostSpiceWare, on Mon Jan 11, 2010 2:25 PM, said:

The following is what I did in Medieval Mayhem, you can get the source in blog if you're interested (scroll down to the entry titled Take 4 for the current source)

NTSC            = 0
PAL             = 1
COMPILE_VERSION = NTSC

...

 IF COMPILE_VERSION = NTSC
ShieldColor1 = $62 ; Purple
ShieldColor2 = $c8 ; Green
ShieldColor3 = $44 ; Red
ShieldColor4 = $86 ; Blue

WallColor0 = $22
WallColor1 = $24
WallColor2 = $26
WallColor3 = $28
WallColor4 = $2a
WallColor5 = $2c
MenuColor  = $B8 ; Teal
ValueColor = $68 ; Purple
SlctMenuColor = $FE ; Yellow
SlctBackground = $04 ; Grey
WingColor      = $1c ; Gold
BodyColor      = $42 ; Red
OVERSCAN_DELAY = $1b
FIREBALL_DELAY = 70 ; 75 second delay for launch of extra fireball
                    ; (delay * 60) / 64
ATTRACT_DELAY = 19 ; 20 second delay for going into Attract Mode
 ELSE
ShieldColor1 = $a2 ; Purple
ShieldColor2 = $58 ; Green
ShieldColor3 = $64 ; Red
ShieldColor4 = $d6 ; Blue
WallColor0 = $42
WallColor1 = $44
WallColor2 = $46
WallColor3 = $48
WallColor4 = $4a
WallColor5 = $4c
MenuColor  = $78 ; Teal
ValueColor = $C8 ; Purple
SlctMenuColor = $2E ; Yellow
SlctBackground = $04 ; Grey
WingColor      = $2C ; Gold
BodyColor      = $62 ; Red
OVERSCAN_DELAY = $57
FIREBALL_DELAY = 59 ; 75 second delay for launch of extra fireball
                    ; (delay * 50) / 64
ATTRACT_DELAY = 16  ; 20 second delay for going into Attract Mode
 ENDIF

Lovely, cheers for the help....I got it working in the end, the formatting had me confused for a bit.....




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users