diff options
author | Bad Diode <bd@badd10de.dev> | 2023-08-31 09:24:29 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2023-08-31 09:24:29 +0200 |
commit | ea85184fdadf08760aa8f88871f96ddf8dde2914 (patch) | |
tree | 7cefaf976881d3d4a1035e2213689dfb982b8f88 /src/debug.c | |
parent | 7a02b549a38dadb48c43143ff94c9094abf25555 (diff) | |
download | uxngba-ea85184fdadf08760aa8f88871f96ddf8dde2914.tar.gz uxngba-ea85184fdadf08760aa8f88871f96ddf8dde2914.zip |
Fix dup(2kr) and ovr(2kr) behaviour
Diffstat (limited to 'src/debug.c')
-rw-r--r-- | src/debug.c | 67 |
1 files changed, 38 insertions, 29 deletions
diff --git a/src/debug.c b/src/debug.c index fd695cb..17c1c73 100644 --- a/src/debug.c +++ b/src/debug.c | |||
@@ -156,37 +156,46 @@ print_debug_info(u8 flags) { | |||
156 | txt_printf("%02x ", uxn_ram[i]); | 156 | txt_printf("%02x ", uxn_ram[i]); |
157 | } | 157 | } |
158 | } | 158 | } |
159 | txt_printf("\nMOUSE"); | 159 | if (flags == 0) { |
160 | for (size_t i = 0x90; i < (0x90 + 16); i++) { | 160 | txt_printf("\nRAM (ZP)"); |
161 | if (i % 8 == 0) { | 161 | for (size_t i = 0; i < 32; i++) { |
162 | txt_printf("\n"); | 162 | if (i % 8 == 0) { |
163 | } | 163 | txt_printf("\n"); |
164 | txt_printf(" "); | 164 | } |
165 | txt_printf("%02x", device_data[i]); | 165 | if (i % 2 == 0) { |
166 | } | 166 | txt_printf(" "); |
167 | txt_printf("\nRAM (ZP)"); | 167 | } |
168 | for (size_t i = 0; i < 32; i++) { | 168 | txt_printf("%02x", uxn_ram[i]); |
169 | if (i % 8 == 0) { | ||
170 | txt_printf("\n"); | ||
171 | } | ||
172 | if (i % 2 == 0) { | ||
173 | txt_printf(" "); | ||
174 | } | ||
175 | txt_printf("%02x", uxn_ram[i]); | ||
176 | } | ||
177 | txt_printf("\nWST ("); | ||
178 | txt_printf("SIZE: %d)", wst_ptr - (uintptr_t)wst); | ||
179 | for (size_t i = 0; i < 64; i++) { | ||
180 | if (i % 8 == 0) { | ||
181 | txt_printf("\n"); | ||
182 | } | 169 | } |
183 | if (i % 2 == 0) { | 170 | txt_printf("\nWST ("); |
184 | txt_printf(" "); | 171 | txt_printf("SIZE: %d)", wst_ptr - (uintptr_t)wst); |
172 | for (size_t i = 0; i < 32; i++) { | ||
173 | if (i % 8 == 0) { | ||
174 | txt_printf("\n"); | ||
175 | } | ||
176 | if (i % 2 == 0) { | ||
177 | txt_printf(" "); | ||
178 | } | ||
179 | if (i >= (wst_ptr - (uintptr_t)wst)) { | ||
180 | txt_printf("%02x", 0); | ||
181 | } else { | ||
182 | txt_printf("%02x", wst[i]); | ||
183 | } | ||
185 | } | 184 | } |
186 | if (i >= (wst_ptr - (uintptr_t)wst)) { | 185 | txt_printf("\nRST ("); |
187 | txt_printf("%02x", 0); | 186 | txt_printf("SIZE: %d)", rst_ptr - (uintptr_t)rst); |
188 | } else { | 187 | for (size_t i = 0; i < 32; i++) { |
189 | txt_printf("%02x", wst[i]); | 188 | if (i % 8 == 0) { |
189 | txt_printf("\n"); | ||
190 | } | ||
191 | if (i % 2 == 0) { | ||
192 | txt_printf(" "); | ||
193 | } | ||
194 | if (i >= (rst_ptr - (uintptr_t)rst)) { | ||
195 | txt_printf("%02x", 0); | ||
196 | } else { | ||
197 | txt_printf("%02x", rst[i]); | ||
198 | } | ||
190 | } | 199 | } |
191 | } | 200 | } |
192 | } | 201 | } |