Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MEGA65: Switch "zero page" to $1600 - $16ff #315

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions mos-platform/mega65/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ add_platform_object_file(mega65-unmap-basic unmap-basic.o unmap-basic.S)

add_platform_library(mega65-c kernal.S)
target_include_directories(mega65-c BEFORE PUBLIC .)

target_compile_options(mega65-unmap-basic PRIVATE
-mcpu=mos45gs02
)
8 changes: 6 additions & 2 deletions mos-platform/mega65/unmap-basic.S
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
ldx #$44 ; unmap all C65 ROMs except $e000-$ffff
stx $d030

lda #$16 ; Switch zero page to $1600 - $16ff
tab


; restore BASIC ROM after all other exit handlers have completed
.section .fini.990,"axR", @progbits
Expand All @@ -24,7 +27,8 @@
; restore C65 ROMs to as before
ldx #$64
stx $d030

lda #$00 ; Switch zero page back to default
tab

cli