more sane directory name, updated binaries

This commit is contained in:
FeralChild64 committed 2020-06-26 19:44:01 +02:00
1 parent d4d32095d1
commit 76aaf298b8
697 files changed
+56 -56

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
// Computes Mapping the C64 p88
.word basic_cold_start
+9
View File
@@ -0,0 +1,9 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
// Computes Mapping the C64 p88
.word basic_warm_start
@@ -0,0 +1,45 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Continuation of the BASIC cold start routine
//
basic_cold_start_internal:
// Setup vectors at $300
ldy #$0B
!:
lda basic_vector_defaults_1, y
sta IERROR, y
dey
bpl !-
// Setup misc vectors
ldy #$04
!:
lda basic_vector_defaults_2, y
sta ADRAY1, y
dey
bpl !-
// Setup USRPOK
lda #$4C // JMP opcode
sta USRPOK
lda #<do_ILLEGAL_QUANTITY_error
sta USRADD+0
lda #>do_ILLEGAL_QUANTITY_error
sta USRADD+1
// Clear the BRK location address
lda #$00
sta CMP0+0
sta CMP0+1
// Print startup messages
jsr INITMSG
// jump into warm start loop
jmp basic_warm_start
@@ -0,0 +1,30 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Continuation of the BASIC cold start routine
//
basic_warm_start_real:
#if CONFIG_MEMORY_MODEL_60K
// We need our helpers to get to filenames under ROMs or IO area
jsr install_ram_routines
#endif
// If warm start caused by BRK, print it address
// XXX sys 58235 also triggers this - to be fixed
lda CMP0
ora CMP0+1
beq !+
ldx #IDX__STR_BRK_AT
jsr print_packed_misc_str
lda CMP0+1
jsr print_hex_byte
lda CMP0+0
jsr print_hex_byte
!:
jmp basic_main_loop
+31
View File
@@ -0,0 +1,31 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
// BASIC Cold start entry point
// Computes Mapping the 64 p211
basic_cold_start:
#if ROM_LAYOUT_STD // skip on non-sgtandard ROM layouts - they produce single image nevertheless
// Before doing anything, check if we have a compatible BASIC/KERNAL pair
ldy #(__rom_revision_basic_end - rom_revision_basic - 1)
!:
lda rom_revision_basic, y
cmp rom_revision_kernal, y
beq !+
panic #P_ERR_ROM_MISMATCH
!:
dey
bpl !--
#endif
// Remaining part would not fit here
jmp basic_cold_start_internal
+8
View File
@@ -0,0 +1,8 @@
The address of the BASIC cold start routine (see Compute's Mapping the Commodore 64, page 211) is well known, see for example here:
- https://www.lemon64.com/forum/viewtopic.php?t=70680&sid=3ff66caf7f5fdf2a3c2ff2ee31fc3fd8
Fixing this routine also has a great advantage for us - since it's address lies in the uppeer ROM region, it's easier to bailout
when someone tries to use our 'kernal.rom' with the original 'basic.rom'.
@@ -0,0 +1,10 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
// Clear screen etc, show READY prompt.
basic_warm_start:
jmp basic_warm_start_real
+5
View File
@@ -0,0 +1,5 @@
This is a well-known address, needed even for some BASIC programming - it's a common target for a SYS command. See for example here:
- http://ready64.org/articoli/_files/043_pokesc64.txt
sys 58235 - Warm Start
+25
View File
@@ -0,0 +1,25 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Well-known BASIC routine, described in:
//
// - [CM64] Computes Mapping the Commodore 64 - page 212
//
// Prints the start-up messages
//
INITMSG:
#if ROM_LAYOUT_M65
jsr map_BASIC_1
jsr_ind VB1__INITMSG
jmp map_NORMAL
#else
jmp initmsg_real
#endif
+3
View File
@@ -0,0 +1,3 @@
This routine is mentionned in the cartridge writing tutorial here: https://codebase64.org/doku.php?id=base:assembling_your_own_cart_rom_image
We have to implement (or at least provide stub), otherwise cartridges will crash.
+25
View File
@@ -0,0 +1,25 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# M65 BASIC_1 #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Print out the amount of free bytes - for the startup banner
//
initmsg_bytes_free:
jsr basic_do_new
sec
lda MEMSIZ+0
sbc TXTTAB+0
tax
lda MEMSIZ+1
sbc TXTTAB+1
jsr print_integer
// Print rest of the start up message
ldx #IDX__STR_BYTES
jmp print_packed_misc_str
+164
View File
@@ -0,0 +1,164 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# M65 BASIC_1 #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
// Routine is too long to fit in the original location
#if ROM_LAYOUT_M65
INITMSG:
#else
initmsg_real:
#endif
// Clear the screen first, some cartridges (like IEEE-488) are leaving a mess on the screen
lda #147
jsr JCHROUT
#if CONFIG_BANNER_SIMPLE
lda #<startup_banner
ldy #>startup_banner
jsr STROUT
#if !CONFIG_BRAND_CUSTOM_BUILD
ldx #$01
ldy #$04
jsr plot_set
lda #<rom_revision_basic_string
ldy #>rom_revision_basic_string
jsr STROUT
#endif // no CONFIG_BRAND_CUSTOM_BUILD
#if !CONFIG_BRAND_CUSTOM_BUILD
ldx #$03
#else
ldx #$02
#endif
ldy #$04
jsr plot_set
jsr initmsg_bytes_free
#if !CONFIG_BRAND_CUSTOM_BUILD
ldx #$06
#else
ldx #$05
#endif
ldy #$00
#if CONFIG_SHOW_FEATURES
jsr plot_set
jmp print_features
#else
jmp plot_set
#endif
#elif CONFIG_BANNER_FANCY
lda #<rainbow_logo
ldy #>rainbow_logo
jsr STROUT
ldx #$00
ldy #$0A
jsr plot_set
lda #<startup_banner
ldy #>startup_banner
jsr STROUT
#if !CONFIG_BRAND_CUSTOM_BUILD
ldx #$01
ldy #$0A
jsr plot_set
lda #<pre_revision_string
ldy #>pre_revision_string
jsr STROUT
lda #<rom_revision_basic_string
ldy #>rom_revision_basic_string
jsr STROUT
#endif // no CONFIG_BRAND_CUSTOM_BUILD
#if !CONFIG_BRAND_CUSTOM_BUILD
ldx #$03
#else
ldx #$02
#endif
ldy #$0A
jsr plot_set
jsr initmsg_bytes_free
#if !CONFIG_BRAND_CUSTOM_BUILD
ldx #$06
#else
ldx #$05
#endif
ldy #$00
#if CONFIG_SHOW_FEATURES
jsr plot_set
jmp print_features
#else
jmp plot_set
#endif
#elif CONFIG_BANNER_BRAND && CONFIG_BRAND_MEGA_65
lda #<startup_banner
ldy #>startup_banner
jsr STROUT
#if ROM_LAYOUT_M65
// XXX make it different for future Mega65 native mode
ldx #$02
ldy #$21
jsr plot_set
lda #<text_mode_64
ldy #>text_mode_64
jsr STROUT
#endif
ldx #$05
ldy #$00
jsr plot_set
lda #<rom_revision_basic_string
ldy #>rom_revision_basic_string
jsr STROUT
ldx #$05
ldy #$12
jsr plot_set
jsr initmsg_bytes_free
#if CONFIG_SHOW_FEATURES
ldx #$08
ldy #$00
jsr plot_set
jmp print_features
#else
ldx #$07
ldy #$00
jmp plot_set
#endif
#endif
+149
View File
@@ -0,0 +1,149 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# M65 BASIC_1 #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Startup banner, to be displayed during cold start
//
.encoding "petscii_upper"
.macro BANNER_TEXT() {
#if CONFIG_BRAND_CUSTOM_BUILD
.text "OPEN ROMS "
.text CONFIG_CUSTOM_BRAND
#elif CONFIG_BRAND_GENERIC
.text "OPEN ROMS GENERIC BUILD"
#elif CONFIG_BRAND_TESTING
.text "OPEN ROMS TESTING BUILD"
#elif CONFIG_BRAND_MEGA_65
.text "OPEN ROMS FOR MEGA65"
#elif CONFIG_BRAND_ULTIMATE_64
.text "OPEN ROMS FOR ULTIMATE 64"
#endif
}
startup_banner:
#if CONFIG_BANNER_SIMPLE
.text " "
BANNER_TEXT()
.byte $00
#elif CONFIG_BANNER_FANCY
BANNER_TEXT()
.byte $00
rainbow_logo:
{
#if CONFIG_COLORS_BRAND && CONFIG_BRAND_MEGA_65
.var SET_COLOR_0 = $05
.var SET_COLOR_1 = $9A
.var SET_COLOR_2 = $1E
.var SET_COLOR_3 = $9E
.var SET_COLOR_4 = $96
#else
.var SET_COLOR_0 = $05
.var SET_COLOR_1 = $1C
.var SET_COLOR_2 = $9E
.var SET_COLOR_3 = $1E
.var SET_COLOR_4 = $9F
#endif
.byte SET_COLOR_1, $12, $A4, $A4, $A4, $A4, $A4, $A4, $A4, $0D
.byte SET_COLOR_2, $12, $A4, $A4, $A4, $A4, $A4, $A4, $0D
.byte SET_COLOR_3, $12, $A4, $A4, $A4, $A4, $A4, $0D
.byte SET_COLOR_4, $12, $A4, $A4, $A4, $A4, $92
.byte SET_COLOR_0, $00
}
#if !CONFIG_BRAND_CUSTOM_BUILD
pre_revision_string:
.text "RELEASE "
.byte $00
#endif // no CONFIG_BRAND_CUSTOM_BUILD
#elif CONFIG_BANNER_BRAND && CONFIG_BRAND_MEGA_65
// Fancy Mega65 banner - from Retrofan, slightly tweaked
.byte $9A, $12, $20, $20, $7F, $A9, $20, $20, $1F, $20, $9A, $20, $20, $20, $20, $1F
.byte $20, $9A, $A9, $20, $20, $20, $92, $A1, $1F, $12, $20, $9A, $A9, $20, $20, $20
.byte $7F, $1F, $20, $20, $9A, $A3, $A3, $A3, $A3, $A3, $A3, $A3, $1F
.byte $0D
.byte $9A, $12, $20, $20, $20, $20, $20
.byte $20, $1F, $20, $9A, $20, $20, $92, $A2, $bb, $1F, $12, $20, $9A, $20, $20, $92
.byte $Ac, $A2, $A2, $1F, $12, $20, $9A, $20, $20, $1F, $20, $9A, $20, $20, $1F, $20
.byte $20, $1e, $A3, $A3, $A3, $A3, $A3, $A3, $1F
.byte $0D
.byte $9A, $12, $20, $20, $92, $7F, $A9, $12, $20, $20, $1F, $20, $9A, $20, $20, $A2
.byte $92, $be, $1F, $12, $20, $9A, $20, $20, $92, $bc, $12, $20, $20, $1F, $20, $9A
.byte $20, $20, $20, $20, $20, $1F, $20, $20, $9e, $A3, $A3, $A3, $A3, $A3, $1F
.byte $0D
.byte $9A, $12, $20, $20, $1F, $20, $20, $9A, $20, $20, $1F, $20, $9A, $20, $20, $20
.byte $20, $1F, $20, $9A, $20, $20, $20, $20, $20, $1F, $20, $9A, $20, $20, $1F, $20
.byte $9A, $20, $20, $1F, $20, $20, $96, $A3, $A3, $A3, $A3, $1F, $92
.byte $0D, $0D, $05, $00
// Fancy Mega65 banner - from Retrofan
//
// .byte $9a, $12, $20, $20, $7f, $a9, $20, $20, $1f, $20, $9a, $20, $20, $20
// .byte $20, $1f, $20, $9a, $a9, $20, $20, $20, $92, $a1, $1f, $12, $20, $9a, $a9, $20
// .byte $20, $20, $7f, $1f, $20, $20, $9a, $a3, $a3, $a3, $a3, $a3, $a3, $a3, $1f, $20
// .byte $20, $20, $20, $05, $92, $4d, $45, $47, $41, $9a, $12, $20, $20, $20, $20, $20
// .byte $20, $1f, $20, $9a, $20, $20, $92, $a2, $bb, $1f, $12, $20, $9a, $20, $20, $92
// .byte $ac, $a2, $a2, $1f, $12, $20, $9a, $20, $20, $1f, $20, $9a, $20, $20, $1f, $20
// .byte $20, $1e, $a3, $a3, $a3, $a3, $a3, $a3, $1f, $20, $20, $20, $20, $05, $92, $42
// .byte $41, $53, $49, $43, $9a, $12, $20, $20, $92, $7f, $a9, $12, $20, $20, $1f, $20
// .byte $9a, $20, $20, $a2, $92, $be, $1f, $12, $20, $9a, $20, $20, $92, $bc, $12, $20
// .byte $20, $1f, $20, $9a, $20, $20, $20, $20, $20, $1f, $20, $20, $9e, $a3, $a3, $a3
// .byte $a3, $a3, $1f, $20, $20, $20, $20, $05, $92, $2d, $2d, $2d, $2d, $2d, $2d, $9a
// .byte $12, $20, $20, $1f, $20, $20, $9a, $20, $20, $1f, $20, $9a, $20, $20, $20, $20
// .byte $1f, $20, $9a, $20, $20, $20, $20, $20, $1f, $20, $9a, $20, $20, $1f, $20, $9a
// .byte $20, $20, $1f, $20, $20, $96, $a3, $a3, $a3, $a3, $1f
// .byte $92, $0D, $0D, $05, $00
// Original Mega65 banner - supplied by Deft
//
// .byte $9A,$12,$A3,$A3,$A3,$A3,$A3,$A3,$DF,$9B,$92,$20,$05,$12,$A0,$A0
// .byte $DF,$9B,$92,$20,$05,$12,$A0,$A0,$DF,$9B,$92,$20,$05,$12,$A0,$A0
// .byte $DF,$9B,$92,$20,$05,$12,$A0,$A0,$DF,$9A,$92,$20,$05,$20,$20,$20
// .byte $4D,$20,$45,$20,$47,$20,$41,$0D,$99,$12,$A3,$A3,$A3,$A3,$A3,$A3
// .byte $A3,$DF,$92,$7F,$12,$CD,$CD,$DF,$92,$7F,$12,$DF,$05,$92,$20,$20
// .byte $99,$7F,$12,$DF,$05,$92,$20,$20,$99,$7F,$12,$DF,$92,$7F,$12,$DF
// .byte $05,$92,$20,$20,$99,$42,$20,$41,$20,$53,$20,$49,$20,$43,$0D,$9E
// .byte $12,$A3,$A3,$A3,$A3,$A3,$A3,$A3,$A3,$DF,$9B,$92,$7F,$12,$DF,$92
// .byte $7F,$12,$DF,$92,$7F,$12,$CD,$05,$92,$20,$20,$9B,$7F,$12,$CD,$92
// .byte $7F,$12,$DF,$92,$7F,$12,$CD,$92,$7F,$12,$DF,$9A,$92,$20,$05,$20
// .byte $9A,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$0D,$96,$12,$A3,$A3,$A3,$A3,$A3
// .byte $A3,$A3,$A3,$A3,$DF,$9A,$92,$7F,$12,$DF,$92,$7F,$9B,$20,$9A,$7F
// .byte $12,$A0,$A0,$9B,$92,$20,$9A,$7F,$12,$A0,$A0,$9B,$92,$20,$9A,$7F
// .byte $12,$DF,$92,$7F,$9B,$20,$9A,$20,$9B,"0.2.0.0",$0D
// .byte $0D,$05,$92,$00
#if ROM_LAYOUT_M65
text_mode_64:
.text "LEGACY"
.byte $11, $9D, $9D, $9D, $9D, $9D
.text "MODE"
.byte $00
#endif
#endif