initial LNMX calculation routine

This commit is contained in:
FeralChild64 committed 2020-01-08 18:36:46 +01:00
1 parent 98e7e633e8
commit b498d4010b
5 files changed
+73 -35

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
//
// Sets PNTR in a proper range (0-39 or 40-79) depending on the
//
screen_calculate_PNTR:
ldy TBLX
lda LDTBL, y
php
jsr screen_get_clipped_PNTR
plp
bmi screen_calculate_PNTR_0_39
// FALLTROUGH
screen_calculate_PNTR_40_79:
tya
clc
adc #40
tay
// FALLTROUGH
screen_calculate_PNTR_0_39:
sty PNTR
rts