Skip to content

Commit

Permalink
[X16EDIT] changes from upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
mooinglemur committed Oct 9, 2023
1 parent 2a4546c commit 5f73775
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 5 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,13 @@ all: $(BUILD_DIR)/rom.bin $(ROM_LABELS) $(ROM_LST)
$(BUILD_DIR)/rom.bin: $(BANK_BINS)
cat $(BANK_BINS) > $@

x16edit_update:
@rm -rf x16edittmp
git clone https://github.com/stefan-b-jakobsson/x16-edit.git x16edittmp
rsync -av --delete --delete-after --exclude=/.git --exclude=/customrom.bin x16edittmp/ x16-edit/
(cd x16-edit && git rev-parse HEAD > .git-commit)
rm -rf x16edittmp

clean:
rm -f $(GIT_SIGNATURE)
rm -rf $(BUILD_DIR)
Expand Down
2 changes: 1 addition & 1 deletion x16-edit/.git-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
efd2bc583ae5c9a1b78dfbce639925a4471469e4
2a4546c6282fde4b1e035a865223a66a5c5f21c5
2 changes: 1 addition & 1 deletion x16-edit/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ $(BUILD_DIR)/x16edit-rom.bin: $(BUILD_DIR)/help.bin $(BUILD_DIR)/help_short.bin

# Clean-up target
clean:
rm -f $(BUILD_DIR)/*
rm -f $(BUILD_DIR)/*
20 changes: 17 additions & 3 deletions x16-edit/main.asm
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ exit:
.proc main_loadfile_with_options_entry
jsr main_init
bcs exit ;C=1 => init failed

;Auto indent
bbr0 r1+1, :+
inc cmd_auto_indent_status
Expand Down Expand Up @@ -227,7 +227,7 @@ exit:
; the values are ignored and replaced with X=1 and Y=255.
;Returns.............: C=1 if program initialization failed
;Error returns.......: None
.proc main_init
.proc main_init
;Ensure we are in binary mode
cld

Expand Down Expand Up @@ -264,6 +264,13 @@ exit:
cpy mem_top
bcs err

;Save R2-R4 on stack
ldx #5
: lda r2,x
pha
dex
bpl :-

;Set program mode to default
stz APP_MOD

Expand All @@ -281,7 +288,6 @@ exit:
bridge_jsrfar_call help_decompress
cli
jsr mem_init
jsr file_init
jsr keyboard_init
Expand All @@ -292,6 +298,14 @@ exit:
jsr scancode_init
jsr mouse_init

;Restore stack
ldx #0
: pla
sta r2,x
inx
cpx #6
bne :-

;Exit without errors, C=0
clc
rts
Expand Down

0 comments on commit 5f73775

Please sign in to comment.