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

+36
View File
@@ -0,0 +1,36 @@
//
// Sets LNMX to 39 or 79
//
// YYY value is improper shortly after linee growth!
screen_calculate_LNMX: // YYY review all the code, mayybe some optimizations are possible using this value
ldy TBLX
lda LDTBL, y
bpl screen_calculate_lnmx_79 // this line is a continuation
cpy #24
beq screen_calculate_lnmx_39 // this is the last line, which is not a continuation
iny
lda LDTBL, y
bpl screen_calculate_lnmx_79 // line is continued
// FALLTROUGH
screen_calculate_lnmx_39:
lda #39
skip_2_bytes_trash_nvz
// FALLTROUGH
screen_calculate_lnmx_79:
lda #79
sta LNMX
rts