Jump to content
IGNORED

Need help with g2f source output...


dwhyte

Recommended Posts

What does it normally do? Just an endless loop or something?

 

If keyboard IRQs are enabled, then you can just insert code in the loop which waits for a keypress.

 

Once the keypress is detected, then you'd probably want to disable DLIs and return to some sort of normal screen.

 

If you upload the source, I could probably point out what to do.

Link to comment
Share on other sites

main

;-- init PMG

mva >pmg $d407 ;missiles and players data address

mva #3 $d01d ;enable players and missiles

 

ift .def CHANGES ;if label CHANGES defined

jsr save_color ;then save all colors and set value 0 for all colors

eif

 

lda:cmp:req 20 ;wait 1 frame

 

sei ;stop interrups

mva #0 $d40e ;stop all interrupts

mva #$fe $d301 ;switch off ROM to get 16k more ram

 

mwa #nmi $fffa ;new NMI handler

 

mva #$c0 $d40e ;switch on NMI+DLI again

 

ift .def CHANGES ;if label CHANGES defined

jsr fade_in ;fade in colors

 

 

;--------

_lp lda $d20f ;wait to press any key; here you can put any own routine

and #4

bne _lp

; --------

 

 

 

jsr fade_out ;fade out colors

mva #0 $d01d ;PMG disabled

mva #$ff $d301 ;ROM switch on

mva #$40 $d40e ;only NMI interrupts, DLI disabled

cli ;IRQ enabled

jmp ($a) ;jump to DOS

els

null jmp dli1 ;CPU is busy here, so no more routines allowed

eif

Link to comment
Share on other sites

main

;-- init PMG

mva >pmg $d407 ;missiles and players data address

mva #3 $d01d ;enable players and missiles

 

ift .def CHANGES ;if label CHANGES defined

jsr save_color ;then save all colors and set value 0 for all colors

eif

 

lda:cmp:req 20 ;wait 1 frame

 

sei ;stop interrups

mva #0 $d40e ;stop all interrupts

mva #$fe $d301 ;switch off ROM to get 16k more ram

 

mwa #nmi $fffa ;new NMI handler

 

mva #$c0 $d40e ;switch on NMI+DLI again

 

ift .def CHANGES ;if label CHANGES defined

jsr fade_in ;fade in colors

 

 

;--------

_lp lda $d20f ;wait to press any key; here you can put any own routine

and #4

bne _lp

; --------

 

 

 

jsr fade_out ;fade out colors

mva #0 $d01d ;PMG disabled

mva #$ff $d301 ;ROM switch on

mva #$40 $d40e ;only NMI interrupts, DLI disabled

cli ;IRQ enabled

jmp ($a) ;jump to DOS

els

null jmp dli1 ;CPU is busy here, so no more routines allowed

eif

 

lol... looks very familiar xxl... Trouble is, is that's not working... I've tried... Tried elsewhere in the source too... saving as a ged-- bitmap and replacing cycle waits to a keyboard check with the same cpu cycles... Does it have something to do with the two lines 1> sei & 2> mwa #$fe $d301? (I'm only an Atari intermediate... hopefully going to advanced user within a year or two)...

All I want it to to is check for a kb press... then exit back to whatever called it, basically a normal procedure/rts...

 

Here's the output from g2f... I plan on relocating it from $2000 to around $7000 or so, maybe $8000... Once I get this routine done, I think disk 1 will be in alpha... levels should be complete next week(disk 2), as well as the rest of the vectors... then the fun truly begins... the combat engine...

 

[EDIT]

 

What I doesn't make sense to me, is that it's bypassing all the kb, fade stuff (label changes not set) so it goes straight to the jmp dli1... So, if it's going straight to run in a dli loop... The DLI and DLIST gets set in a the VBL? What am I missing... it's just not making sense at the moment...

wizardry.zip

Edited by dwhyte
Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...