GideonZ / 1541ultimate

Official GIT archive of 1541 ultimate II sources
GNU General Public License v3.0
173 stars 45 forks source link

Feature request: machine code monitor #151

Open lagomorph opened 4 years ago

lagomorph commented 4 years ago

A built in monitor (even if extremely basic) that could simply examine an address and change its value would be an extremely useful enhancement. While various monitors exist in cartridge and software form, they alter the system and are not always functional in all situations.

Zibri commented 1 year ago

I agree. Pressing the freeze button with no cartridge loaded should go straight into a Monitor. The one of retroreplay would suffice.

Jusalak commented 1 year ago

Even memory poke functionality would be a nice addition. It probably is not too difficult to implement.

Jusalak commented 1 year ago

A memory dump display and accompanying hex input would be a good start and far easier to implement.

GideonZ commented 1 year ago

Indeed. For this, the 'viewer' class should start supporting editing. INterestingly the class is called "Editor", but it never got the edit functions. Sub classes could implement special operations for reading and writing, so it would be relatively easy to edit memory. It is just a hassle to implement this with just 'move' and 'out' functions.

Message ID: @.***>

chrisgleissner commented 12 months ago

@GideonZ I am currently experimenting and checking how we could expose a hex monitor for the C64 RAM which allows users to modify the RAM on the fly. This could lend itself to small machine code monitor, possibly a disassembler.

I found some poke functionality in the context-sensitive menu of the U64 (u64config.cc) which you tied to a feature flag, but disabled in prod. I enabled and extended it, and it seems exactly what we need as a starting point. I can peek values of the C64 RAM (C64 running, Ultimate UI in overlay) and poke them, and both sides (C64 and Ultimate UI) see the correct values.

Was there any reason why you decided to not expose the Poke functionality in prod, and should this feature also work for non-Ultimate-64 devices?

I added my changes to the Draft PR https://github.com/GideonZ/1541ultimate/pull/358 for further discussion.