BlankB.asm 6.69K
20 downloads
Posted Wed Dec 14, 2011 3:13 AM
BlankB.asm 6.69K
20 downloads
Posted Wed Dec 14, 2011 3:53 AM
Posted Wed Dec 14, 2011 5:59 AM
Posted Wed Dec 14, 2011 6:07 AM
Posted Wed Dec 14, 2011 6:19 AM
Posted Wed Dec 14, 2011 6:19 AM
Posted Wed Dec 14, 2011 4:00 PM
Posted Thu Dec 15, 2011 8:09 AM
Posted Thu Dec 15, 2011 5:45 PM
Edited by jbs30000, Thu Dec 15, 2011 5:46 PM.
Posted Thu Dec 15, 2011 7:02 PM
Posted Thu Dec 15, 2011 8:08 PM
jbs30000, on Thu Dec 15, 2011 5:45 PM, said:
rem * a simple batari Basic program loop drawscreen goto loop
Posted Thu Dec 15, 2011 10:20 PM
RevEng, on Thu Dec 15, 2011 7:02 PM, said:
Posted Fri Dec 16, 2011 2:16 AM
BlankC.asm.bin 4K
15 downloads
BlankC.asm 7.31K
12 downloads
Posted Fri Dec 16, 2011 6:05 AM
Posted Sun Dec 18, 2011 7:43 PM
; Thomas Jentzsch Skipdraw ;======================================================================== ;The best way, I knew until now, was (if y contains linecounter): tya ; 2 ; sec ; 2 <- this can sometimes be avoided sbc SpriteEnd ; 3 adc #SPRITEHEIGHT ; 2 bcx .skipDraw ; 2 = 9-11 cycles ; ... ; --------- or ------------ ;If you like using illegal opcodes, you can use dcp (dec,cmp) here: lda #SPRITEHEIGHT ; 2 dcp SpriteEnd ; 5 initial value has to be adjusted bcx .skipDraw ; 2 = 9 ; ... ;Advantages: ;- state of carry flag doesn't matter anymore (may save 2 cycles) ;- a remains constant, could be useful for a 2nd sprite ;- you could use the content of SpriteEnd instead of y for accessing sprite data ;- ??? ;======================================================================== ;An Example: ; ; skipDraw routine for right player TXA ; 2 A-> Current scannline SEC ; 2 Set Carry SBC slowP1YCoordFromBottom+1 ; 3 ADC #SPRITEHEIGHT+1 ; 2 calc if sprite is drawn BCC skipDrawRight ; 2/3 To skip or not to skip? TAY ; 2 lda P1Graphic,y ; 4 continueRight: STA GRP0 ;----- this part outside of kernel skipDrawRight ; 3 from BCC LDA #0 ; 2 BEQ continueRight ; 3 Return...I'm pretty much already doing the example code, +1 cycle because I'm using indirect addressing with Y instead of absolute. But I've tried changing the routine to the shorter illegal opcode version, but have no clue how to make it work.
Posted Sun Dec 18, 2011 11:20 PM
TXA ; 2 A-> Current scannline SEC ; 2 Set Carry SBC slowP1YCoordFromBottom+1 ; 3 ADC #SPRITEHEIGHT+1 ; 2 calc if sprite is drawn BCC skipDrawRight ; 2/3 To skip or not to skip? TAY ; 2 lda P1Graphic,y ; 4 continueRight: STA GRP0 ;----- this part outside of kernel skipDrawRight ; 3 from BCC LDA #0 ; 2 BEQ continueRight ; 3 Return...What do I replace with the
lda #SPRITEHEIGHT ; 2 dcp SpriteEnd ; 5 initial value has to be adjusted bcx .skipDraw ; 2 = 9It may be obvious, but I'm totally missing it.
Posted Mon Dec 19, 2011 1:39 AM
; ------- this part before the kernel lda #0 sta temp1 ; a scratch memory location lda player1y sta SpriteEnd ; SpriteEnd gets obliterated each time the kernel runs ; lda #SPRITEHEIGHT ; 2 dcp SpriteEnd ; 5 initial value has to be adjusted bcc .skipDraw ; 2 = 9 ldy SpriteEnd ; 3 lda P1Graphic,y ; 4 continueRight: STA GRP0 ; 3 ;----- this part outside of kernel skipDrawRight ; 3 from BCC LDA temp1 ; 3 - zero-page instead of direct addressing to burn a cycle BEQ continueRight ; 3 Return...
Posted Mon Dec 19, 2011 4:00 AM
0 members, 0 guests, 0 anonymous users