Rybags Posted May 25, 2006 Share Posted May 25, 2006 You could try omitting the STA WSYNC in the DLI... just do the vector setup first, maybe 1 or 2 NOPs and it might delay enough to make the colour transition invisible. Maybe try running the game as a kernal, get rid of the DLIs completely... would save the setup cost, plus eliminate all the register saves. Just base everything on VCOUNT. Might have to disable IRQs though, since key activity could cause jitter. Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted May 25, 2006 Author Share Posted May 25, 2006 i am just over the DLI... i loose a lot of CPU time and memory there... i am sure this can be optimised and done more clever... ;**** rasterinterrupt for the main game screen dli1 pha txa pha tya pha ldy #8 lda interlace ;check for interlace and delay one scanline bne dli_loop sta wsync sta wsync sta wsync sta wsync sta wsync sta wsync dli_loop lda var1 tax add #$f0 sta var1 sta wsync sta wsync sta wsync sta wsync sta wsync sta wsync sta wsync sta wsync sta wsync sta wsync sta wsync sta wsync sta $d01a stx wsync stx $d01a sta wsync sta $d01a dey bne dli_loop mva #$a8 wsync sta $d01a sta start_kernel pla tay pla tax pla rti Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted May 25, 2006 Author Share Posted May 25, 2006 btw. at the moment i saved more than 60 bytes just due to reorganising code... so next is definitly the DLI and the preshifter... Quote Link to comment Share on other sites More sharing options...
Rybags Posted May 25, 2006 Share Posted May 25, 2006 Have some z-page locations at the ready as counters and just have a loop: WAIT1 sta wsync dec zcount1 bne WAIT1 Have a subroutine which does groups of 4 wsyncs? Or a subroutine that waits using VCOUNT ($D40B)... but that would be dependant on having a register spare at the time. Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted May 25, 2006 Author Share Posted May 25, 2006 i guess i am going for a simple precalculator for a colour table and will use that instead of the tons of the wsyncs which each needs 3 bytes... Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted May 25, 2006 Author Share Posted May 25, 2006 i am at 1100 bytes compared to 1300... few more to go... Quote Link to comment Share on other sites More sharing options...
Rybags Posted May 25, 2006 Share Posted May 25, 2006 Put a JMP $E462 at the end of your DLI routines... 3 bytes saved each time. But, won't work since you've swapped out the OS (why do that anyway for a 1K game?) Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted May 25, 2006 Author Share Posted May 25, 2006 os switchted off to have more zero page and more control and more cpu cycles per vbl... Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted May 25, 2006 Author Share Posted May 25, 2006 btw. the colour table approach needs same amount of ram... grrr... i am switching back to the 2nd DLI (with your jsr wsync3 method...) Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted May 25, 2006 Author Share Posted May 25, 2006 1k is really really tough... Quote Link to comment Share on other sites More sharing options...
Rybags Posted May 25, 2006 Share Posted May 25, 2006 Why not just leave the OS on? Store 1 in CRITIC ($42) and only the immediate VBlank will run, or just JMP $e462 from your VB Immediate routine. That would probably save 20 bytes of coding. Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted May 25, 2006 Author Share Posted May 25, 2006 packed i am at 1039, unpacked 1150 = 111 difference... depacker needs 59 bytes btw... so very compact... Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted May 25, 2006 Author Share Posted May 25, 2006 ok...ok... it had to be done... i lost all my nice score and hiscore chars... but... i am now packed at 999 bytes! soooo many room to colour up the sprites, highscore routine, sound and the animation of the little man... grrrr.... vulcano.zip 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.