Mercurial > repos > blastem
comparison dis.c @ 2146:0c0d4233d826
Fix SP end address in disassembler
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 26 Mar 2022 20:10:21 -0700 |
parents | 7451f970ee66 |
children | 4c265d2f6c88 |
comparison
equal
deleted
inserted
replaced
2145:62a53c052d9b | 2146:0c0d4233d826 |
---|---|
339 } | 339 } |
340 named_labels = add_label(named_labels, "user_start", user_start); | 340 named_labels = add_label(named_labels, "user_start", user_start); |
341 do_cd_labels = 1; | 341 do_cd_labels = 1; |
342 } else { | 342 } else { |
343 uint32_t sub_start =filebuf[0x40/2] << 16 | filebuf[0x42/2]; | 343 uint32_t sub_start =filebuf[0x40/2] << 16 | filebuf[0x42/2]; |
344 uint32_t sub_end =filebuf[0x44/2] << 16 | filebuf[0x46/2]; | 344 uint32_t sub_end = sub_start + (filebuf[0x44/2] << 16 | filebuf[0x46/2]); |
345 if (sub_start > (boot_size - 0x20)) { | 345 if (sub_start > (boot_size - 0x20)) { |
346 fprintf(stderr, "System Program start offset is %X, but image is only %X bytes\n", sub_start, (uint32_t)boot_size); | 346 fprintf(stderr, "System Program start offset is %X, but image is only %X bytes\n", sub_start, (uint32_t)boot_size); |
347 return 1; | 347 return 1; |
348 } | 348 } |
349 if (sub_end > boot_size) { | 349 if (sub_end > boot_size) { |