Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- safe VSP channel explained, for mayhem in monsterland release:
- disk original code:
- $213d- starts irq stabilization (TSX TXS method)
- .C:2196 20 82 B1 JSR $B182 ;delay
- .C:2199 A0 1B LDY #$1B
- .C:219b A9 12 LDA #$12
- .C:219d 8D 11 D0 STA $D011 ;rasterline is $50 and cycle is 50 here
- .C:21a0 8C 11 D0 STY $D011
- .C:21a3 8E 12 D0 STX $D012
- .C:21a6 A2 FC LDX #$FC
- .C:21a8 9A TXS
- .C:21a9 A9 1F LDA #$1F
- .C:21ab 8D 18 D0 STA $D018
- .C:21ae A9 00 LDA #$00
- .C:21b0 A2 06 LDX #$06
- .C:21b2 A0 00 LDY #$00
- .C:21b4 40 RTI
- safe VSP mod :
- .C:2181 A2 1B LDX #$1B ;this is inserted inside irq routine, value is $1B EOR (safe channel #)
- .C:2183 A5 10 LDA $10
- .C:2185 09 10 ORA #$10
- .C:2187 8D 16 D0 STA $D016
- .C:218a AD 12 D0 LDA $D012
- .C:218d C9 30 CMP #$30
- .C:218f F0 00 BEQ $2191
- .C:2191 A5 0F LDA $0F
- .C:2193 4A LSR A
- .C:2194 90 00 BCC $2196
- .C:2196 20 82 B1 JSR $B182 ;delay
- .C:2199 A0 1B LDY #$1B
- .C:219b A9 12 LDA #$12
- .C:219d 8D 11 D0 STA $D011 ;like above, rasterline should be $50 and cycle should be 50 here
- .C:21a0 8E 11 D0 STX $D011 ;this is inserted for safe VSP
- .C:21a3 8C 11 D0 STY $D011
- so, plot is, rewrite or modify the stable irq routine with adding LDX#$value before (to be stored into $D011) and
- between DEC$D011 ($12 here or $1A) and INC$D011 ($1B), store X value into $D011, without breaking the cycle-exact timing.
- result is : safe VSP works same as LFT's VSP-LAB release (first introduced in his SAFE VSP demo).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement