MEGA65 / mega65-core

MEGA65 FPGA core
Other
240 stars 85 forks source link

Matrix Mode "@" command acts like "M" with no arguments #596

Closed dansanderson closed 2 years ago

dansanderson commented 2 years ago

Test Environment (required)

Describe the bug Appendix K of the book says the Matrix Mode command @ works like M but takes a 16-bit address and calculates it in the CPU memory mapping context. As far as I can tell, @ is ignoring its parameter and behaving like M without arguments.

To Reproduce

  1. Enter Matrix Mode: Mega + Tab.
  2. m2001
  3. @3000

Expected behavior Step 2 should show memory starting at address 07773000 (where 0777 is the special prefix that says the monitor is using the CPU memory mapping context). It actually shows 00002011.

lydon42 commented 2 years ago

Yes, @ seems not to parse the address at all, as it jumps to dump_mem before parsing the address at all.

dump_cpu_memory_cmd:
      lda #$01
      sta use_cpu_perspective
      jmp dump_mem
      plx                               ; pop x
      ; we really should make sure it is only a 16-bit address,
      ; but it isn't that important
      jsr         parse_addr32_or_continue
      jmp         dump_mem