namex

by nambona

Game: smw

Description: experiments

; Example code. Makes Mario crazy.
!upsidedowntable1 = $7FA000
!upsidedowntable2 = $7FA200
!height			 = $00DF

init:
main:
	REP #$30
	LDX #$0000
	LDY.w #!height
	-
	TYA
	CLC
	ADC $1C
	STA !upsidedowntable1,x
	TYA
	CLC
	ADC $20
	STA !upsidedowntable2,x
	DEY #2
	INX #2
	CPX.w #!height*2
	BCC -
	
	SEP #$10
	
	LDA #$0E42
	STA $4340
	LDA.w #indirectfliptable1
	STA $4342
	LDX.b #indirectfliptable1>>16
	STX $4344
	LDX #$7F
	STX $4347
	LDA #$1042
	STA $4350
	
	LDA.w #indirectfliptable2
	STA $4352
	LDX.b #indirectfliptable2>>16
	STX $4354
	LDX #$7F
	STX $4357
	
	SEP #$20
	
	LDA #$30
	TSB $0D9F
	rtl


indirectfliptable1:
db $F0
	dw $a000
	dw $a002
	dw $a004
	dw $a006
	dw $a008
	dw $a00a
	dw $a00c
	dw $a00e
	dw $a010
	dw $a012
	dw $a014
	dw $a016
	dw $a018
	dw $a01a
	dw $a01c
	dw $a01e
	dw $a020
	dw $a022
	dw $a024
	dw $a026
	dw $a028
	dw $a02a
	dw $a02c
	dw $a02e
	dw $a030
	dw $a032
	dw $a034
	dw $a036
	dw $a038
	dw $a03a
	dw $a03c
	dw $a03e
	dw $a040
	dw $a042
	dw $a044
	dw $a046
	dw $a048
	dw $a04a
	dw $a04c
	dw $a04e
	dw $a050
	dw $a052
	dw $a054
	dw $a056
	dw $a058
	dw $a05a
	dw $a05c
	dw $a05e
	dw $a060
	dw $a062
	dw $a064
	dw $a066
	dw $a068
	dw $a06a
	dw $a06c
	dw $a06e
	dw $a070
	dw $a072
	dw $a074
	dw $a076
	dw $a078
	dw $a07a
	dw $a07c
	dw $a07e
	dw $a080
	dw $a082
	dw $a084
	dw $a086
	dw $a088
	dw $a08a
	dw $a08c
	dw $a08e
	dw $a090
	dw $a092
	dw $a094
	dw $a096
	dw $a098
	dw $a09a
	dw $a09c
	dw $a09e
	dw $a0a0
	dw $a0a2
	dw $a0a4
	dw $a0a6
	dw $a0a8
	dw $a0aa
	dw $a0ac
	dw $a0ae
	dw $a0b0
	dw $a0b2
	dw $a0b4
	dw $a0b6
	dw $a0b8
	dw $a0ba
	dw $a0bc
	dw $a0be
	dw $a0c0
	dw $a0c2
	dw $a0c4
	dw $a0c6
	dw $a0c8
	dw $a0ca
	dw $a0cc
	dw $a0ce
	dw $a0d0
	dw $a0d2
	dw $a0d4
	dw $a0d6
	dw $a0d8
	dw $a0da
	dw $a0dc
	dw $a0de
db $F0
	dw $a0e0
	dw $a0e2
	dw $a0e4
	dw $a0e6
	dw $a0e8
	dw $a0ea
	dw $a0ec
	dw $a0ee
	dw $a0f0
	dw $a0f2
	dw $a0f4
	dw $a0f6
	dw $a0f8
	dw $a0fa
	dw $a0fc
	dw $a0fe
	dw $a100
	dw $a102
	dw $a104
	dw $a106
	dw $a108
	dw $a10a
	dw $a10c
	dw $a10e
	dw $a110
	dw $a112
	dw $a114
	dw $a116
	dw $a118
	dw $a11a
	dw $a11c
	dw $a11e
	dw $a120
	dw $a122
	dw $a124
	dw $a126
	dw $a128
	dw $a12a
	dw $a12c
	dw $a12e
	dw $a130
	dw $a132
	dw $a134
	dw $a136
	dw $a138
	dw $a13a
	dw $a13c
	dw $a13e
	dw $a140
	dw $a142
	dw $a144
	dw $a146
	dw $a148
	dw $a14a
	dw $a14c
	dw $a14e
	dw $a150
	dw $a152
	dw $a154
	dw $a156
	dw $a158
	dw $a15a
	dw $a15c
	dw $a15e
	dw $a160
	dw $a162
	dw $a164
	dw $a166
	dw $a168
	dw $a16a
	dw $a16c
	dw $a16e
	dw $a170
	dw $a172
	dw $a174
	dw $a176
	dw $a178
	dw $a17a
	dw $a17c
	dw $a17e
	dw $a180
	dw $a182
	dw $a184
	dw $a186
	dw $a188
	dw $a18a
	dw $a18c
	dw $a18e
	dw $a190
	dw $a192
	dw $a194
	dw $a196
	dw $a198
	dw $a19a
	dw $a19c
	dw $a19e


indirectfliptable2:
db $F0
	dw $a200
	dw $a202
	dw $a204
	dw $a206
	dw $a208
	dw $a20a
	dw $a20c
	dw $a20e
	dw $a210
	dw $a212
	dw $a214
	dw $a216
	dw $a218
	dw $a21a
	dw $a21c
	dw $a21e
	dw $a220
	dw $a222
	dw $a224
	dw $a226
	dw $a228
	dw $a22a
	dw $a22c
	dw $a22e
	dw $a230
	dw $a232
	dw $a234
	dw $a236
	dw $a238
	dw $a23a
	dw $a23c
	dw $a23e
	dw $a240
	dw $a242
	dw $a244
	dw $a246
	dw $a248
	dw $a24a
	dw $a24c
	dw $a24e
	dw $a250
	dw $a252
	dw $a254
	dw $a256
	dw $a258
	dw $a25a
	dw $a25c
	dw $a25e
	dw $a260
	dw $a262
	dw $a264
	dw $a266
	dw $a268
	dw $a26a
	dw $a26c
	dw $a26e
	dw $a270
	dw $a272
	dw $a274
	dw $a276
	dw $a278
	dw $a27a
	dw $a27c
	dw $a27e
	dw $a280
	dw $a282
	dw $a284
	dw $a286
	dw $a288
	dw $a28a
	dw $a28c
	dw $a28e
	dw $a290
	dw $a292
	dw $a294
	dw $a296
	dw $a298
	dw $a29a
	dw $a29c
	dw $a29e
	dw $a2a0
	dw $a2a2
	dw $a2a4
	dw $a2a6
	dw $a2a8
	dw $a2aa
	dw $a2ac
	dw $a2ae
	dw $a2b0
	dw $a2b2
	dw $a2b4
	dw $a2b6
	dw $a2b8
	dw $a2ba
	dw $a2bc
	dw $a2be
	dw $a2c0
	dw $a2c2
	dw $a2c4
	dw $a2c6
	dw $a2c8
	dw $a2ca
	dw $a2cc
	dw $a2ce
	dw $a2d0
	dw $a2d2
	dw $a2d4
	dw $a2d6
	dw $a2d8
	dw $a2da
	dw $a2dc
	dw $a2de
db $F0
	dw $a2e0
	dw $a2e2
	dw $a2e4
	dw $a2e6
	dw $a2e8
	dw $a2ea
	dw $a2ec
	dw $a2ee
	dw $a2f0
	dw $a2f2
	dw $a2f4
	dw $a2f6
	dw $a2f8
	dw $a2fa
	dw $a2fc
	dw $a2fe
	dw $a300
	dw $a302
	dw $a304
	dw $a306
	dw $a308
	dw $a30a
	dw $a30c
	dw $a30e
	dw $a310
	dw $a312
	dw $a314
	dw $a316
	dw $a318
	dw $a31a
	dw $a31c
	dw $a31e
	dw $a320
	dw $a322
	dw $a324
	dw $a326
	dw $a328
	dw $a32a
	dw $a32c
	dw $a32e
	dw $a330
	dw $a332
	dw $a334
	dw $a336
	dw $a338
	dw $a33a
	dw $a33c
	dw $a33e
	dw $a340
	dw $a342
	dw $a344
	dw $a346
	dw $a348
	dw $a34a
	dw $a34c
	dw $a34e
	dw $a350
	dw $a352
	dw $a354
	dw $a356
	dw $a358
	dw $a35a
	dw $a35c
	dw $a35e
	dw $a360
	dw $a362
	dw $a364
	dw $a366
	dw $a368
	dw $a36a
	dw $a36c
	dw $a36e
	dw $a370
	dw $a372
	dw $a374
	dw $a376
	dw $a378
	dw $a37a
	dw $a37c
	dw $a37e
	dw $a380
	dw $a382
	dw $a384
	dw $a386
	dw $a388
	dw $a38a
	dw $a38c
	dw $a38e
	dw $a390
	dw $a392
	dw $a394
	dw $a396
	dw $a398
	dw $a39a
	dw $a39c
	dw $a39e
back to listings