migrated code to pragma-like ROM layout definitions

This commit is contained in:
FeralChild64 committed 2020-01-15 20:06:14 +01:00
1 parent 435ff6bbc2
commit 63c0404313
326 files changed
+1553 -1840

No files matched your search

+3 -4
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// CHROUT routine - screen support (character output)
@@ -128,6 +130,3 @@ chrout_screen_done:
jsr cursor_show_if_enabled
jmp chrout_done_success
#endif // ROM layout
+3 -4
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// CLR key handling within CHROUT
@@ -9,6 +11,3 @@ chrout_screen_CLR:
jsr clear_screen
jmp chrout_screen_calc_lptr_done
#endif // ROM layout
+3 -4
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// CHROUT routine - screen support, control codes
@@ -67,6 +69,3 @@ chrout_try_color_loop:
// Unknown code, or key not requiring any handling
jmp chrout_screen_done
#endif // ROM layout
+3 -4
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Cursor keys handling within CHROUT
@@ -54,6 +56,3 @@ chrout_screen_CRSR_LEFT:
lda #39
sta PNTR
bne chrout_screen_CRSR_done // branch always
#endif // ROM layout
+3 -4
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// CHROUT routine - screen support, DEL key handling
@@ -116,6 +118,3 @@ chrout_screen_del_column_0:
// Finish with recalculating all the variables
bne chrout_screen_del_done
#endif // ROM layout
+3 -4
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// GFX/TXT mode switch handling within CHROUT
@@ -18,6 +20,3 @@ chrout_screen_TXT:
lda VIC_YMCSB
ora #$02 // to lower case
bne !- // branch always
#endif // ROM layout
+3 -4
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// HOME key handling within CHROUT
@@ -9,6 +11,3 @@ chrout_screen_HOME:
jsr cursor_home
jmp chrout_screen_calc_lptr_done
#endif // ROM layout
+3 -4
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// CHROUT routine - screen support, INS key handling
@@ -92,6 +94,3 @@ chrout_screen_ins_copy_loop:
// Return from loop
rts
#endif // ROM layout
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Jumptable for screen control codes support. To improve performance, should be sorted
@@ -121,6 +123,3 @@ chrout_screen_jumptable:
.if (mod(*, $2) == 0) { nop } // make sure routine size is always the same, needed by build system
#endif
#endif // ROM layout
+3 -4
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// CHROUT routine - screen support, control codes in quote mode
@@ -19,6 +21,3 @@ chrout_screen_quote:
adc #$BF // C=1, so adding $BF + C = add $C0
!:
jmp chrout_screen_literal
#endif // ROM layout
+3 -4
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// RETURN key handling within CHROUT
@@ -28,6 +30,3 @@ chrout_screen_RETURN:
jsr screen_calculate_PNT_USER
!:
jmp screen_advance_to_next_line
#endif // ROM layout
+3 -4
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// RVS ON/OFF handling within CHROUT
@@ -16,6 +18,3 @@ chrout_screen_RVS_OFF:
!:
sta RVS
jmp chrout_screen_done
#endif // ROM layout
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// SHIFT ON/OFF handling within CHROUT
@@ -16,6 +18,3 @@ chrout_screen_SHIFT_OFF:
lda #$80 // disable SHIFT+VENDOR combination
bne !- // branch always
#endif // ROM layout
+3 -4
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// STOP key handling within CHROUT
@@ -17,6 +19,3 @@ chrout_screen_STOP:
#endif
#endif // ROM layout
+3 -4
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Tabulation keys handling within CHROUT
@@ -38,6 +40,3 @@ chrout_screen_TAB_BW:
#endif // CONFIG_EDIT_TABULATORS
#endif // ROM layout
+3 -4
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Variables used:
@@ -79,6 +81,3 @@ cursor_blink_timer_reset:
cursor_blink_end:
rts
#endif // ROM layout
+4 -4
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Variables used:
@@ -7,9 +9,7 @@
cursor_enable:
lda #$00
sta BLNSW
rts
#endif // ROM layout
+3 -4
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Variables used:
@@ -34,6 +36,3 @@ cursor_show:
cursor_show_end:
rts
#endif // ROM layout
+3 -4
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Official Kernal routine, described in:
@@ -33,6 +35,3 @@ plot_get:
ldy PNTR
ldx TBLX
rts
#endif // ROM layout
+3 -4
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Clear screen and initialise line link table, described in:
@@ -29,6 +31,3 @@ clear_screen:
// Fall to cursor home routine
jmp cursor_home
#endif // ROM layout
+3 -4
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Home the cursor, described in:
@@ -14,6 +16,3 @@ cursor_home:
sta TBLX // current row
// FALLTROUGH to the next routine
#endif // ROM layout
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Set pointer (PNT) to current screen line , described in:
@@ -14,6 +16,3 @@ screen_calculate_pointers:
jsr screen_calculate_PNT_USER
jmp screen_calculate_PNTR_LNMX
#endif // ROM layout
+3 -4
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Scroll the whole screen up by 1 logical line, described in:
@@ -129,6 +131,3 @@ screen_scroll_up_loop_done:
// Recalculate PNT and USER
jmp screen_calculate_PNT_USER
#endif // ROM layout
+3 -4
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Well-known routine, described in:
@@ -33,6 +35,3 @@ screen_clear_line:
// Done
rts
#endif // ROM layout
+3 -3
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Official Kernal routine, described in:
@@ -19,5 +21,3 @@ SCREEN:
ldx #40 // 40 rows
rts
#endif // ROM layout
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
screen_advance_to_next_line:
@@ -18,6 +20,3 @@ screen_advance_to_next_line:
sta PNTR
jmp chrout_screen_calc_lptr_done
#endif // ROM layout
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Set pointers PNT and USER to current screen line
@@ -51,6 +53,3 @@ screen_calculate_USER:
sta USER+1
rts
#endif // ROM layout
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Sets PNTR in a proper range (0-39 or 40-79)
@@ -59,6 +61,3 @@ screen_calculate_lnmx_79:
lda #79
sta LNMX
rts
#endif // ROM layout
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
screen_check_space_ends_line:
@@ -9,6 +11,3 @@ screen_check_space_ends_line:
cmp #$20
rts
#endif // ROM layout
+3 -4
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
screen_code_to_petscii:
@@ -36,6 +38,3 @@ s2p_adc_40:
s2p_end:
rts
#endif // ROM layout
+3 -4
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Get PNTR value clipped to 0-39 range in .Y, sets flags to compare with 0, can trash .A
@@ -15,6 +17,3 @@ screen_get_clipped_PNTR:
!:
cpy #$00
rts
#endif // ROM layout
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
screen_get_logical_line_end_ptr:
@@ -24,6 +26,3 @@ screen_get_logical_line_end_39:
ldy #39
rts
#endif // ROM layout
+3 -4
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
screen_grow_logical_line_done_scroll:
@@ -139,6 +141,3 @@ screen_grow_logical_line_copy_done:
inx
jsr screen_clear_line
jmp screen_calculate_PNTR_LNMX
#endif // ROM layout
+3 -4
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Helper routine to blank screen
@@ -27,6 +29,3 @@ screen_off:
#endif
#endif // ROM layout
+3 -4
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Helper routine to show screen
@@ -17,6 +19,3 @@ screen_on:
rts
#endif
#endif // ROM layout
+3 -4
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
screen_preserve_sal_eal:
@@ -30,6 +32,3 @@ screen_common_sal_eal:
phy_trash_a
phx_trash_a
rts
#endif // ROM layout
+3 -4
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
screen_restore_sal_eal:
@@ -24,7 +26,4 @@ screen_restore_sal_eal:
sta SAL+0
jmp screen_common_sal_eal
#endif // ROM layout