Skip to content
Open
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
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PREFIX=/usr
PREFIX=/usr/local
SYSCONFDIR=/etc
KASM?=kasm3
KASM?=java -jar /home/honza/projects/c64/pc-tools/kickass/KickAss.jar

MINGW32?=i686-w64-mingw32
MINGW32-GCC=$(MINGW32)-gcc
Expand Down Expand Up @@ -120,7 +120,7 @@ inpout32.dll:
tools/make-server: tools/make-server.c
$(CC) $(CFLAGS) -o tools/make-server tools/make-server.c

server64.c: tools/make-server server.h server64.asm loader.asm
server64.c: tools/make-server server_h.asm server64.asm loader.asm
$(KASM) :target=c64 :pc=257 -o base server64.asm # 257 = 0101
$(KASM) :target=c64 :pc=513 -o high server64.asm # 513 = 0201
$(KASM) :target=c64 :pc=258 -o low server64.asm # 258 = 0102
Expand All @@ -129,7 +129,7 @@ server64.c: tools/make-server server.h server64.asm loader.asm
tools/make-server c64 base low high loader > server64.c
rm -v base low high loader

server128.c: tools/make-server server.h server128.asm loader.asm
server128.c: tools/make-server server_h.asm server128.asm loader.asm
$(KASM) :target=c128 :pc=257 -o base server128.asm # 257 = 0101
$(KASM) :target=c128 :pc=513 -o high server128.asm # 513 = 0201
$(KASM) :target=c128 :pc=258 -o low server128.asm # 258 = 0102
Expand All @@ -156,7 +156,7 @@ kernal128.c: tools/make-kernal tools/make-kernal.c kernal128.asm
tools/make-bootstrap: tools/make-bootstrap.c
$(CC) $(CFLAGS) -o tools/make-bootstrap tools/make-bootstrap.c

bootstrap-c64.txt: tools/make-bootstrap bootstrap.asm server.h
bootstrap-c64.txt: tools/make-bootstrap bootstrap.asm server_h.asm
$(KASM) :target=c64 -o bootstrap-c64.prg bootstrap.asm && \
tools/make-bootstrap c64 bootstrap-c64.prg > bootstrap-c64.txt

Expand Down
64 changes: 47 additions & 17 deletions bootstrap.asm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.import source "server.h"
.import source "server_h.asm"

.if(target == "c64") {
.pc = $3000
Expand All @@ -14,10 +14,22 @@ jmp main

//------------------------------------------------------------------------------

read: { :read() rts }
write: { :write() rts }
ack: { :ack() rts }
wait: { :wait() rts }
read: {
:read()
rts
}
write: {
:write()
rts
}
ack: {
:ack()
rts
}
wait: {
:wait()
rts
}

//------------------------------------------------------------------------------

Expand Down Expand Up @@ -59,27 +71,45 @@ load: {
lda $dd01
sta (start),y
jsr ack
:next()
inc start
bne !check+
inc start+1

!check:
lda start+1
cmp end+1
bne !loop-

lda start
cmp end
bne !loop-

done: lda end
sta bend
lda end+1
sta bend+1
done:
lda end
sta bend
lda end+1
sta bend+1

lda #$1b
lda #$1b
sta $d011
rts
}

//------------------------------------------------------------------------------

readHeader: {
jsr read stx mem
jsr read stx bank
jsr read stx start
jsr read stx start+1
jsr read stx end
jsr read stx end+1
jsr read
stx mem
jsr read
stx bank
jsr read
stx start
jsr read
stx start+1
jsr read
stx end
jsr read
stx end+1
rts
}

Expand Down
Loading