Skip to content

Commit

Permalink
Now compiles and shows the splashscreen on X16
Browse files Browse the repository at this point in the history
  • Loading branch information
johanberntsson committed Feb 29, 2024
1 parent 6213a3e commit 92325bf
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
all: x16

x16:
ruby make.rb examples/dragontroll.z5 -t:x16 -v
ruby make.rb -s examples/dragontroll.z5 -t:x16 -v
#acme --cpu 65c02 -o testx16.bin --format cbm -l temp/acme_labels.txt testx16.asm
# Need F12 to enter the debugger
#grep testscreen temp/acme_labels.txt
Expand Down
4 changes: 2 additions & 2 deletions asm/constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ vmap_buffer_end = $0400 ; Last byte + 1. Should not be more than vmap_buff

!ifdef TARGET_X16 {
basic_reset = $a000
SCREEN_HEIGHT = 25
SCREEN_WIDTH = 40
SCREEN_HEIGHT = 60
SCREEN_WIDTH = 80
SCREEN_ADDRESS = $0000
COLOUR_ADDRESS = $0000
COLOUR_ADDRESS_DIFF = COLOUR_ADDRESS - SCREEN_ADDRESS
Expand Down
9 changes: 9 additions & 0 deletions asm/ozmoo.asm
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,11 @@

; * = $0801 ; This must now be set on command line: --setpc $0801

!ifdef TARGET_X16 {
; Basic: 1 SYS2061
!byte $0b,$08,$01,$00,$9e,$32,$30,$36,$31,$00,$00,$00
}

program_start

!ifdef TARGET_C128 {
Expand Down Expand Up @@ -1790,6 +1795,10 @@ deletable_init_start
}


!ifdef TARGET_X16 {
lda #14
jsr $ffd2
}
!ifdef TARGET_PLUS4 {
!ifdef CUSTOM_FONT {
lda reg_screen_char_mode
Expand Down
4 changes: 4 additions & 0 deletions asm/splashscreen.asm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ splash_line_y
adc #20
+
}
!ifdef TARGET_X16 {
clc
adc #20
}
!ifdef TARGET_MEGA65 {
clc
adc #20
Expand Down
19 changes: 10 additions & 9 deletions make.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1327,9 +1327,9 @@ def add_boot_file(finaldiskname, diskimage_filename)
end
end

def play(filename)
def play(filename, storyname)
if $target == "x16" then
command = "#{$X16} -run \"#{filename}\""
command = "cd #{filename} && ../#{$X16} -prg #{storyname} -run -scale 2"
elsif $target == "mega65" then
if defined? $MEGA65 then
command = "#{$MEGA65} -8 \"#{filename}\""
Expand Down Expand Up @@ -2084,18 +2084,19 @@ def build_81(storyname, diskimage_filename, config_data, vmem_data, vmem_content
def build_zip(storyname, diskimage_filename, config_data, vmem_data,
vmem_contents, preload_max_vmem_blocks)
# create folder if needed, and clear old contents, if any
foldername = "#{$target}_#{storyname}"
foldername = "#{$target}_#{storyname}"
FileUtils.rm_rf(foldername)
FileUtils.mkdir_p(foldername)

# Add terp and story file
FileUtils.cp($good_zip_file, foldername+"/"+storyname+".prg")
FileUtils.cp($ozmoo_file, foldername+"/"+storyname)
FileUtils.cp($story_file, foldername+"/"+storyname+".dat")

# Add bootfile + terp + preloaded vmem blocks file to disk
# if add_boot_file(diskfilename, diskimage_filename) != true
puts "Successfully built game as #{foldername}"
nil # Signal success
# Add bootfile + terp + preloaded vmem blocks file to disk
# if add_boot_file(diskfilename, diskimage_filename) != true
puts "Successfully built game as #{foldername}"
$bootdiskname = foldername
nil # Signal success
end

def print_usage_and_exit
Expand Down Expand Up @@ -3180,7 +3181,7 @@ def print_usage
end

if !error and auto_play then
play("#{$bootdiskname}")
play("#{$bootdiskname}", storyname)
end


Expand Down

0 comments on commit 92325bf

Please sign in to comment.