If you are wondering cycle 73 or 74 hmoves hide the black "comb" lines on in an Atari game. The consequence of using cycle 73 or 74 hmoves is that you can only fine position the object leftward.
hmove74.zip 3.02K
34 downloads
Posted Thu Jun 9, 2011 2:54 PM
hmove74.zip 3.02K
34 downloads
Posted Thu Jun 9, 2011 10:16 PM
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; prep to position top object
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
lda quickPos
sta HMP0
and #$0F
tay ; delay count
ldx #0 ; 0 = GRP0, 1 = GRP1, etc..
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; position top object in 1 scanline
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
sta WSYNC
;---------------------------------------
nop ;2 @2
nop ;2 @4
nop ;2 @6
nop ;3 @8
.waitPos:
dey ;2 @10
bpl .waitPos ;2³ @12/13
jmp.ind (indirectAddress) ;5 @17 jump into table below
position_3:
sta RESP0,X
.byte $9D ; sta $1095,X (rom space), skip next two bytes
position_15:
sta RESP0,X
.byte $9D
position_30:
sta RESP0,X
.byte $9D
position_45:
sta RESP0,X
.byte $9D
position_60:
sta RESP0,X
.byte $9D
position_75:
sta RESP0,X
.byte $9D
position_90:
sta RESP0,X
.byte $9D
position_105:
sta RESP0,X
.byte $9D
position_120:
sta RESP0,X
.byte $9D
position_135:
sta RESP0,X
.byte $9D
position_150:
sta RESP0,X
sta HMOVE ;3 @74
nop ;2 @76 free time
Edited by Omegamatrix, Thu Jun 9, 2011 10:25 PM.
Posted Fri Jun 10, 2011 10:03 AM
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; prep to position top object
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; -5 = RESP0
; -4 = RESP1
; -3 = RESM0
; -2 = RESM1
; -1 = RESBL
ldx #-5
lda quickPos
sta HMP0+5,X
and #$0F
tay ; delay count
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; position top object in 1 scanline
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
sta WSYNC
;---------------------------------------
nop ;2 @2
nop ;2 @4
nop ;2 @6
nop ;3 @8
.waitPos:
dey ;2 @10
bpl .waitPos ;2³ @12/13
jmp.ind (indirectAddress) ;5 @17 jump into table below
postion_3:
sta RESP0+5,X
.byte $1C ; nop $1595,X (rom space), skip next two bytes
postion_15:
sta RESP0+5,X
.byte $1C
postion_30:
sta RESP0+5,X
.byte $1C
postion_45:
sta RESP0+5,X
.byte $1C
postion_60:
sta RESP0+5,X
.byte $1C
postion_75:
sta RESP0+5,X
.byte $1C
postion_90:
sta RESP0+5,X
.byte $1C
postion_105:
sta RESP0+5,X
.byte $1C
postion_120:
sta RESP0+5,X
.byte $1C
postion_135:
sta RESP0+5,X
.byte $1C
postion_150:
sta RESP0+5,X
sta HMOVE ;3 @74
nop ;2 @76 free time
;---------------------------------------
Posted Fri Jun 10, 2011 12:41 PM
L_EDGE_VAL = $71
R_EDGE_VAL = $C0
LEFT_ADJ = $9A
RIGHT_ADJ = $50
lax quickPos
and #$0F
sta tempOne
txa ; quickPos
lsr
lsr
lsr
lsr
tay ; HMxx >> 4, use Y to find next HMxx value
bit SWCHA ; test joystick
bvc .moveLeft
bmi .exitRoutine ; if no change
;else move right...
cpx #R_EDGE_VAL
beq .alignLeft
cpx #LEFT_ADJ
beq .fixRight
lda RightTab,Y
cpy #9
beq .addDelayCount
bne .prepForAddition ; always branch
.alignLeft:
lda #L_EDGE_VAL
.byte $0C
.alignRight:
lda #R_EDGE_VAL
.byte $0C
.fixLeft:
lda #LEFT_ADJ
.byte $0C
.fixRight:
lda #RIGHT_ADJ
bne .storeQuickPos ; always branch
LeftTab:
.byte $10
.byte $20
.byte $30
.byte $40
.byte $50
.byte $60
.byte $70
.byte $90
nop
.byte $A0
.byte $B0
.byte $C0
.byte $D0
.byte $E0
RightTab:
.byte $F0 ; shared
.byte $00 ; shared
.byte $10
.byte $20
.byte $30
.byte $40
.byte $50
.byte $60
nop
.byte $70
.byte $90
.byte $A0
.byte $B0
.byte $C0
.byte $D0
; .byte $E0 shared with CPX #immediate opcode
.moveLeft:
cpx #L_EDGE_VAL
beq .alignRight
cpx #RIGHT_ADJ
beq .fixLeft
lda LeftTab,Y
cpy #7
bne .prepForAddition
dec tempOne
.prepForAddition:
clc
.addDelayCount:
adc tempOne
.storeQuickPos:
sta quickPos
.exitRoutine:
Edited by Omegamatrix, Fri Jun 10, 2011 12:43 PM.
Posted Fri Jun 10, 2011 3:19 PM
ldy objHpos
lda PositionTab,Y
sta HMP0+5,X
and #$0F
tay
;......
PositionTab:
.byte $71,$61,$51,$41,$31,$21,$11,$01,$F1,$E1,$D1,$C1,$B1,$A1,$91
.byte $72,$62,$52,$42,$32,$22,$12,$02,$F2,$E2,$D2,$C2,$B2,$A2,$92
.byte $73,$63,$53,$43,$33,$23,$13,$03,$F3,$E3,$D3,$C3,$B3,$A3,$93
.byte $74,$64,$54,$44,$34,$24,$14,$04,$F4,$E4,$D4,$C4,$B4,$A4,$94
.byte $75,$65,$55,$45,$35,$25,$15,$05,$F5,$E5,$D5,$C5,$B5,$A5,$95
.byte $76,$66,$56,$46,$36,$26,$16,$06,$F6,$E6,$D6,$C6,$B6,$A6,$96
.byte $77,$67,$57,$47,$37,$27,$17,$07,$F7,$E7,$D7,$C7,$B7,$A7,$97
.byte $78,$68,$58,$48,$38,$28,$18,$08,$F8,$E8,$D8,$C8,$B8,$A8,$98
.byte $79,$69,$59,$49,$39,$29,$19,$09,$F9,$E9,$D9,$C9,$B9,$A9,$99
.byte $7A,$6A,$5A,$4A,$3A,$2A,$1A,$0A,$FA,$EA,$DA,$CA,$BA,$AA,$9A
.byte $50,$40,$30,$20,$10,$00,$F0,$E0,$D0,$C0
Posted Sat Jun 18, 2011 2:49 PM
Posted Sat Jun 18, 2011 8:43 PM
Posted Sun Jun 19, 2011 4:30 AM
Posted Sun Jun 19, 2011 5:12 AM
JAC!, on Sun Jun 19, 2011 4:30 AM, said:
Posted Sun Jun 19, 2011 5:42 PM
HMPx values
0 1 2 3 4 5 6 7 8 9 a b c d e f
73 -8 -9 -10 -11 -12 -13 -14 -15 0 -1 -2 -3 -4 -5 -6 -7
74 -8 -9 -10 -11 -12 -13 -14 -15 0 -1 -2 -3 -4 -5 -6 -7 **
75 0 -1 -2 -3 -4 -5 -6 -7 8 7 6 5 4 3 2 1 HBLANK
76 0 -1 -2 -3 -4 -5 -6 -7 8 7 6 5 4 3 2 1 HBLANK
77 0 -1 -2 -3 -4 -5 -6 -7 8 7 6 5 4 3 2 1 HBLANK
78 0 -1 -2 -3 -4 -5 -6 -7 8 7 6 5 4 3 2 1 HBLANK
79 0 -1 -2 -3 -4 -5 -6 -7 8 7 6 5 4 3 2 1 HBLANK
Posted Mon Jun 20, 2011 1:06 AM
0 members, 0 guests, 0 anonymous users