Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set optimization noinlinedata
- dim counter = z
- dim current = b
- dim combined = c
- dim r16lo = d
- dim r16hi = e
- dim jflag = f
- dim sflags = g
- dim previous = p
- dim save_switches = s
- dim column = temp1
- dim row = temp2
- dim sc1 = score
- dim sc2 = score+1
- dim sc3 = score+2
- dim p0plo = player0pointerlo
- dim p0phi = player0pointerhi
- dim p1plo = player1pointerlo
- dim p1phi = player1pointerhi
- dim p0ptr = p0phi.p0plo
- dim p1ptr = p1phi.p1plo
- dim dtmp = temp2.temp1
- const p0datlo = <p0dat
- const p0dathi = >p0dat
- const p1datlo = <p1dat
- const p1dathi = >p1dat
- COLUBK = 0
- COLUPF = $64
- COLUP0 = $28
- COLUP1 = $28
- scorecolor = $1E
- counter = 0
- r16lo = 7
- player0y = 88 : player1y = 88
- player0x = 144 : player1x = 152
- p0plo = p0datlo
- p0phi = p0dathi
- player0height = 4
- p1plo = p1datlo
- p1phi = p1dathi
- player1height = 4
- previous = rand
- sflags = $F0
- jflag = 0
- main
- counter=counter+1
- if !joy0fire then fire_up
- if jflag then skip_fire
- jflag = 1
- gosub cycle : goto skip_fire
- fire_up
- if jflag then jflag = 0
- skip_fire
- a = ((SWCHA ^ $F0) & sflags) & $F0 : sflags = SWCHA
- if !a then skip_switches
- if a{4} then y = y - 1
- if a{5} then y = y + 1
- if a{6} then x = x - 1
- if a{7} then x = x + 1
- gosub do_scor
- gosub plot
- skip_switches
- COLUP0 = $28
- COLUP1 = $28
- drawscreen
- goto main
- plot
- combined = x + y : combined = (combined * 8 ^ combined) * 4 ^ combined
- on r gosub r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 rA rB rC rD rE rF
- column = current / 8
- row = current & 7
- pfpixel column row on
- previous = current
- return
- r0
- current = combined
- return
- r1
- r2
- r3
- r4
- r5
- r6
- r7
- r8
- rand = combined
- for i=1 to r
- current = rand
- next
- return
- r9
- rand = x + y
- rand = rand + y
- current = rand
- return
- rA
- current = current
- return
- rB
- current = current
- return
- rC
- current = current
- return
- rD
- current = current
- return
- rE
- asm
- lda r16lo
- lsr
- rol r16hi
- bcc *+4
- eor #$B4
- sta r16lo
- eor r16hi
- sta current
- end
- var36 = r16lo
- var40 = r16hi
- return
- rF
- current = pearson[x] ^ y : current = pearson[current]
- return
- cycle
- r = r + 1 : if r = 16 then r = 0
- p0plo = p0datlo
- p1plo = p1datlo
- temp2 = 0 : temp1 = r * 5
- p0ptr = p0ptr + dtmp
- p1ptr = p1ptr + dtmp
- pfclear
- return
- do_scor
- temp6 = x
- sc1 = 0 : sc2 = sc2 & 15
- if temp6 >= 100 then sc1 = sc1 + 16 : temp6 = temp6 - 100
- if temp6 >= 100 then sc1 = sc1 + 16 : temp6 = temp6 - 100
- if temp6 >= 50 then sc1 = sc1 + 5 : temp6 = temp6 - 50
- if temp6 >= 30 then sc1 = sc1 + 3 : temp6 = temp6 - 30
- if temp6 >= 20 then sc1 = sc1 + 2 : temp6 = temp6 - 20
- if temp6 >= 10 then sc1 = sc1 + 1 : temp6 = temp6 - 10
- sc2 = (temp6 * 4 * 4) | sc2
- temp6 = y
- sc2 = sc2 & 240 : sc3 = 0
- if temp6 >= 100 then sc2 = sc2 + 1 : temp6 = temp6 - 100
- if temp6 >= 100 then sc2 = sc2 + 1 : temp6 = temp6 - 100
- if temp6 >= 50 then sc3 = sc3 + 80 : temp6 = temp6 - 50
- if temp6 >= 30 then sc3 = sc3 + 48 : temp6 = temp6 - 30
- if temp6 >= 20 then sc3 = sc3 + 32 : temp6 = temp6 - 20
- if temp6 >= 10 then sc3 = sc3 + 16 : temp6 = temp6 - 10
- sc3 = sc3 | temp6
- return
- asm
- align 256
- end
- data pearson
- 98, 6, 85, 150, 36, 23, 112, 164, 135, 207, 169, 5, 26, 64, 165, 219
- 61, 20, 68, 89, 130, 63, 52, 102, 24, 229, 132, 245, 80, 216, 195, 115
- 90, 168, 156, 203, 177, 120, 2, 190, 188, 7, 100, 185, 174, 243, 162, 10
- 237, 18, 253, 225, 8, 208, 172, 244, 255, 126, 101, 79, 145, 235, 228, 121
- 123, 251, 67, 250, 161, 0, 107, 97, 241, 111, 181, 82, 249, 33, 69, 55
- 59, 153, 29, 9, 213, 167, 84, 93, 30, 46, 94, 75, 151, 114, 73, 22
- 197, 96, 210, 45, 16, 227, 248, 202, 51, 152, 252, 125, 81, 206, 215, 186
- 39, 158, 178, 187, 131, 136, 1, 49, 50, 17, 141, 91, 47, 129, 60, 99
- 154, 35, 86, 171, 105, 34, 38, 200, 147, 58, 77, 118, 173, 246, 76, 254
- 133, 232, 196, 144, 198, 124, 53, 4, 108, 74, 223, 234, 134, 230, 157, 139
- 189, 205, 199, 128, 176, 19, 211, 236, 127, 192, 231, 70, 233, 88, 146, 44
- 183, 201, 22, 83, 13, 214, 116, 109, 159, 32, 95, 226, 140, 220, 57, 12
- 221, 31, 209, 182, 143, 92, 149, 184, 148, 62, 113, 65, 37, 27, 106, 166
- 3, 14, 204, 72, 21, 41, 56, 66, 28, 193, 40, 217, 25, 54, 179, 117
- 238, 87, 240, 155, 180, 170, 242, 212, 191, 163, 78, 218, 137, 194, 175, 110
- 43, 119, 224, 71, 122, 142, 42, 160, 104, 48, 247, 103, 15, 11, 138, 239
- end
- data p0dat
- $64, $8A, $8A, $8A, $64, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
- $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
- $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
- $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
- $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $8E, $C8, $AC, $A8, $CE
- end
- data p1dat
- $AC, $AA, $AC, $EA, $AC, $AE, $A4, $C4, $AC, $C4, $AE, $A8, $C4, $A2, $CC, $AC
- $A2, $C4, $A2, $CC, $A2, $A2, $CE, $AA, $CA, $AC, $A2, $CC, $A8, $CE, $A4, $AA
- $CC, $A8, $C6, $A8, $A8, $C4, $A2, $CE, $A4, $AA, $C4, $AA, $C4, $0C, $02, $06
- $0A, $04, $0A, $0A, $0E, $0A, $04, $0C, $0A, $0C, $0A, $0C, $06, $08, $08, $08
- $06, $0C, $0A, $0A, $0A, $0C, $0E, $08, $0C, $08, $0E, $AA, $EC, $AA, $AA, $4C
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement