dwhyte Posted April 29, 2007 Share Posted April 29, 2007 I'm having a little trouble finding a safe place to insert a quick keycheck and exit routine into the g2f source output... It's an optimized DLI pic... Can anyone point me in the right direction? Quote Link to comment Share on other sites More sharing options...
Rybags Posted April 29, 2007 Share Posted April 29, 2007 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. Quote Link to comment Share on other sites More sharing options...
xxl Posted April 29, 2007 Share Posted April 29, 2007 (edited) del Edited April 29, 2007 by xxl Quote Link to comment Share on other sites More sharing options...
xxl Posted April 29, 2007 Share Posted April 29, 2007 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 Quote Link to comment Share on other sites More sharing options...
dwhyte Posted April 29, 2007 Author Share Posted April 29, 2007 (edited) 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 April 29, 2007 by dwhyte Quote Link to comment Share on other sites More sharing options...
dwhyte Posted April 29, 2007 Author Share Posted April 29, 2007 I realize it's not the best graphic, but it is about 98% the same as the Apple version, minus the animation... Quote Link to comment Share on other sites More sharing options...
analmux Posted April 29, 2007 Share Posted April 29, 2007 (edited) ---deleted--- Edited May 2, 2007 by BRK Quote Link to comment Share on other sites More sharing options...
82atari5200 Posted May 14, 2007 Share Posted May 14, 2007 How would you incorporate the assembly code into a proggie using cc65 as your assembler? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.