Skip to content

Commit dfaa1e0

Browse files
committed
Decode entire ROM if __etext is 0
1 parent 2cbf85d commit dfaa1e0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/decoder.mlog

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,9 @@ reset:
6363
read MEMORY_Y CPU "MEMORY_Y"
6464
read MEMORY_WIDTH CPU "MEMORY_WIDTH"
6565
read MEMORY_PROC_SIZE CPU "MEMORY_PROC_SIZE"
66-
read MEMORY_END_INDEX CPU "MEMORY_END_INDEX"
6766
read LOOKUP_PROC_SIZE CPU "LOOKUP_PROC_SIZE"
67+
read ROM_SIZE CPU "ROM_SIZE"
68+
read MEMORY_END_INDEX CPU "MEMORY_END_INDEX"
6869

6970
# find the index of the first linked lookup proc
7071
# NOTE: the lookup procs must be linked in a contiguous group
@@ -87,11 +88,17 @@ reset__find_lookup_start:
8788
jump load_word always
8889
set __etext result
8990

91+
# if __etext is 0, decode the entire ROM
92+
jump reset__nonzero_etext notEqual __etext 0
93+
set __etext ROM_SIZE
94+
reset__nonzero_etext:
95+
9096
# start decoding at address 4
9197
# (address 0 is __etext)
9298
set pc 4
9399
set opcache_var null
94100

101+
set DECODE_DURATION null
95102
set START_TIME @time
96103

97104
main:

0 commit comments

Comments
 (0)