fix hot code reload
This commit is contained in:
parent
dc4bd72d16
commit
049d388365
BIN
NeutTower.dsk
BIN
NeutTower.dsk
Binary file not shown.
BIN
ProDOS_Blank.dsk
BIN
ProDOS_Blank.dsk
Binary file not shown.
|
@ -350,7 +350,6 @@
|
||||||
(local iblock self.next-free.iblock)
|
(local iblock self.next-free.iblock)
|
||||||
(var block (self:block iblock))
|
(var block (self:block iblock))
|
||||||
(local file-entry (self:generate-file-entry iblock filename type aux bytes))
|
(local file-entry (self:generate-file-entry iblock filename type aux bytes))
|
||||||
(print (length file-entry) file-entry)
|
|
||||||
(set block (splice block self.next-free.entry.entry-offset file-entry))
|
(set block (splice block self.next-free.entry.entry-offset file-entry))
|
||||||
(self:set-block iblock block)
|
(self:set-block iblock block)
|
||||||
(self:update-volume-header {:file-count (+ self.root.file-count 1)}))
|
(self:update-volume-header {:file-count (+ self.root.file-count 1)}))
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
; never want to overlap with 0x2000 from lower memory, so either direction is safe
|
; never want to overlap with 0x2000 from lower memory, so either direction is safe
|
||||||
(local dstpage-first (hi org.addr))
|
(local dstpage-first (hi org.addr))
|
||||||
(local dstpage-last (hi (+ org.addr (length org.bytes) -1)))
|
(local dstpage-last (hi (+ org.addr (length org.bytes) -1)))
|
||||||
(print srclabel dstpage-first dstpage-last)
|
|
||||||
[:block
|
[:block
|
||||||
[:computed :srchi #(+ ($1:lookup-addr :ld-src) 2)]
|
[:computed :srchi #(+ ($1:lookup-addr :ld-src) 2)]
|
||||||
[:computed :dsthi #(+ ($1:lookup-addr :st-dst) 2)]
|
[:computed :dsthi #(+ ($1:lookup-addr :st-dst) 2)]
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
[:vm :hires
|
[:vm :hires
|
||||||
:lit :level1 :load-level
|
:lit :level1 :load-level
|
||||||
(vm:forever
|
(vm:forever
|
||||||
(vm:hotswap-sync :reload-level)
|
(vm:hotswap-sync :lit :level6 :load-level)
|
||||||
:interactive-eval-checkpoint
|
:interactive-eval-checkpoint
|
||||||
:handle-key
|
:handle-key
|
||||||
)
|
)
|
||||||
|
|
|
@ -111,14 +111,13 @@
|
||||||
(coroutine.yield)
|
(coroutine.yield)
|
||||||
(or result "<no result>"))
|
(or result "<no result>"))
|
||||||
(fn Machine.dbgcmd [self cmd ?handlers]
|
(fn Machine.dbgcmd [self cmd ?handlers]
|
||||||
(print "dbgcmd??" cmd)
|
|
||||||
(self:eval (.. "(manager.machine.debugger:command \"" cmd "\")")) ?handlers)
|
(self:eval (.. "(manager.machine.debugger:command \"" cmd "\")")) ?handlers)
|
||||||
(fn Machine.continue [self] (self:dbgcmd :go))
|
(fn Machine.continue [self] (self:dbgcmd :go))
|
||||||
(fn Machine.step [self] (self:dbgcmd :s))
|
(fn Machine.step [self] (self:dbgcmd :s))
|
||||||
(fn Machine.set-bp [self addr ?action]
|
(fn Machine.set-bp [self addr ?action]
|
||||||
; todo: handle setting the same breakpoint more than once?
|
; todo: handle setting the same breakpoint more than once?
|
||||||
(tset self.breakpoints addr {:action ?action})
|
(tset self.breakpoints addr {:action ?action})
|
||||||
(self:eval (.. "(-> (. manager.machine.devices ::maincpu) (: :debug) (: :bpset " (tostring addr) "))")
|
(self:eval (.. "(-> (. manager.machine.devices ::maincpu :debug) (: :bpset " (tostring addr) "))")
|
||||||
{:value #(tset (. self.breakpoints addr) :id (tonumber $2))}))
|
{:value #(tset (. self.breakpoints addr) :id (tonumber $2))}))
|
||||||
(fn Machine.clear-bp [self addr]
|
(fn Machine.clear-bp [self addr]
|
||||||
(local bpid (-?> self.breakpoints (. addr) (. :id)))
|
(local bpid (-?> self.breakpoints (. addr) (. :id)))
|
||||||
|
|
Loading…
Reference in a new issue