fossimon - an NMI based monitor for divMMC and esxDOS

Show us what you're working on, (preferably with screenshots).
Post Reply
User avatar
bob_fossil
Manic Miner
Posts: 662
Joined: Mon Nov 13, 2017 6:09 pm

fossimon - an NMI based monitor for divMMC and esxDOS

Post by bob_fossil »

It's always difficult to find the right present for a 42nd birthday, so here's my attempt - an NMI based monitor for divMMC / esxDOS. :)

Image

Current features include:
  • 42 column memory diaplay
  • Z80 disassembler.
  • Register display.
  • Trace / single step Z80 instructions.
  • POKE memory.
  • Find text, addresses and byte sequences.
  • Save to and load memory from esxDOS files.
  • List files and change folder for esxDOS.
  • Save and load memory snapshots from the monitor.
  • Confgurable colours, number display and disassembly output options.
  • Integration with my Long Filename Browser through an NMI menu.
More information and installation steps can be found in the manual.

Here's some videos of it in action:




You can download it from here.
User avatar
Luzie
Manic Miner
Posts: 912
Joined: Fri May 01, 2020 2:07 pm

Re: fossimon - an NMI based monitor for divMMC and esxDOS

Post by Luzie »

bob_fossil wrote: Tue Apr 23, 2024 9:22 pm It's always difficult to find the right present for a 42nd birthday, so here's my attempt - an NMI based monitor for divMMC / esxDOS. :)
Brillant! Happy Birthday to you! Ooops. Or you mean Speccy´s Birthday? :dance
User avatar
bob_fossil
Manic Miner
Posts: 662
Joined: Mon Nov 13, 2017 6:09 pm

Re: fossimon - an NMI based monitor for divMMC and esxDOS

Post by bob_fossil »

Luzie wrote: Tue Apr 23, 2024 9:35 pm Brillant! Happy Birthday to you! Ooops. Or you mean Speccy´s Birthday? :dance
Spectrum's birthday. :)
rich_r
Drutt
Posts: 36
Joined: Mon Sep 11, 2023 11:57 am

Re: fossimon - an NMI based monitor for divMMC and esxDOS

Post by rich_r »

This is great Bob. Very useful addition to my DivMMC Future :)
Sometimes it's just nice to be able to break in and see what's going on using a real Spectrum rather than an emulator.
User avatar
goodboy
Microbot
Posts: 143
Joined: Tue Jul 23, 2019 8:22 am
Location: Russia

Re: fossimon - an NMI based monitor for divMMC and esxDOS

Post by goodboy »

Is it possible to show numbers in hex?
rich_r
Drutt
Posts: 36
Joined: Mon Sep 11, 2023 11:57 am

Re: fossimon - an NMI based monitor for divMMC and esxDOS

Post by rich_r »

goodboy wrote: Wed Apr 24, 2024 9:36 am Is it possible to show numbers in hex?
You can use the command

Code: Select all

cfg "hx 1
to change to hex. Setting it to 0 puts it back to decimal.
User avatar
8BitSC
Microbot
Posts: 130
Joined: Mon Feb 13, 2023 1:23 am

Re: fossimon - an NMI based monitor for divMMC and esxDOS

Post by 8BitSC »

A welcome tool, @bob_fossil. Very nice.

I appreciate that it has customisation features right from the get-go, along with the ability to save any custom settings with the “cfg *” command, so they become the default on the next activation.

Key repeat is currently a bit keen for my liking. It’s seems very easy to input duplicate characters when typing.

Could key-repeat/delay possibly be customised in a future revision?

Edit: Would also be useful when using the disassemble [d] or dump memory [m] commands to be able to press enter to continue scrolling without having to repeat the command.

Maybe check for input after listing the 8 lines as you currently do, but continue listing if enter is pressed without a preceding command?

If an alternate command is entered, the listing could stop or (if d is used to disassemble and m is pressed before enter), change the listing mode but continue from the next byte and vice-versa?
User avatar
bob_fossil
Manic Miner
Posts: 662
Joined: Mon Nov 13, 2017 6:09 pm

Re: fossimon - an NMI based monitor for divMMC and esxDOS

Post by bob_fossil »

8BitSC wrote: Wed Apr 24, 2024 8:07 pm A welcome tool, @bob_fossil. Very nice.

I appreciate that it has customisation features right from the get-go, along with the ability to save any custom settings with the “cfg *” command, so they become the default on the next activation.

Key repeat is currently a bit keen for my liking. It’s seems very easy to input duplicate characters when typing.

Could key-repeat/delay possibly be customised in a future revision?

Edit: Would also be useful when using the disassemble [d] or dump memory [m] commands to be able to press enter to continue scrolling without having to repeat the command.

Maybe check for input after listing the 8 lines as you currently do, but continue listing if enter is pressed without a preceding command?

If an alternate command is entered, the listing could stop or (if d is used to disassemble and m is pressed before enter), change the listing mode but continue from the next byte and vice-versa?
I knew the first thing people would want to change would be the numbers, colours and disassembly capitalisation. :)

Hadn't noticed the key repeat issue when typing on my +2. I'll have another look.

The ma command works like that - any key carries on the dump where BREAK exits. I guess I could make the d and m commands work in the same way.
User avatar
bob_fossil
Manic Miner
Posts: 662
Joined: Mon Nov 13, 2017 6:09 pm

Re: fossimon - an NMI based monitor for divMMC and esxDOS

Post by bob_fossil »

rich_r wrote: Wed Apr 24, 2024 9:12 am This is great Bob. Very useful addition to my DivMMC Future :)
Sometimes it's just nice to be able to break in and see what's going on using a real Spectrum rather than an emulator.
Thank you! It's nice to be able to do this all from the one interface as well.
User avatar
8BitSC
Microbot
Posts: 130
Joined: Mon Feb 13, 2023 1:23 am

Re: fossimon - an NMI based monitor for divMMC and esxDOS

Post by 8BitSC »

bob_fossil wrote: Wed Apr 24, 2024 9:32 pmThe ma command works like that - any key carries on the dump where BREAK exits. I guess I could make the d and m commands work in the same way.
Thank you for considering this change.

As the listings pause with a prompt after 8 lines, I thought it might be easier just to take a null input (just enter by itself) as a command to continue the listing, again prompting after another 8 lines (as it currently does) until another command is entered.

For continuity; say going from a [d]isassembly listing, instead of pressing enter to continue the listing, pressing M to switch into [m]emory dump mode at the next 8-line break could (possibly?) continue from the next byte if no numeric value is entered, switching to memory dump mode to continue listing where it left off and vice-versa.

This way, you wouldn’t need to break out of the listing, just enter an alternate command at the next 8-line break?
markusr
Drutt
Posts: 28
Joined: Sun Feb 20, 2022 3:14 pm

Re: fossimon - an NMI based monitor for divMMC and esxDOS

Post by markusr »

I had a quick play with fossimon this evening on my OMNI HQ. The OMNI is running EXSDOS 0.87, a version older than what is recommended by the documentation, but it does seem to work, and it's great! Thanks so much for this.

Is it possible to programmatically enter the monitor using one or more assembler instructions? This would be very useful for debugging when developing directly on the Spectrum.
User avatar
bob_fossil
Manic Miner
Posts: 662
Joined: Mon Nov 13, 2017 6:09 pm

Re: fossimon - an NMI based monitor for divMMC and esxDOS

Post by bob_fossil »

markusr wrote: Fri Apr 26, 2024 8:50 pm I had a quick play with fossimon this evening on my OMNI HQ. The OMNI is running EXSDOS 0.87, a version older than what is recommended by the documentation, but it does seem to work, and it's great! Thanks so much for this.

Is it possible to programmatically enter the monitor using one or more assembler instructions? This would be very useful for debugging when developing directly on the Spectrum.
Thanks for the kind words!

You could try:

Code: Select all

call $66		; call the ROM 'NON-MASKABLE INTERRUPT' at $66 / 102
This is what the breakpoint and trace commands use to switch back into the monitor.
markusr
Drutt
Posts: 28
Joined: Sun Feb 20, 2022 3:14 pm

Re: fossimon - an NMI based monitor for divMMC and esxDOS

Post by markusr »

bob_fossil wrote: Fri Apr 26, 2024 8:57 pm You could try:

Code: Select all

call $66		; call the ROM 'NON-MASKABLE INTERRUPT' at $66 / 102
That's excellent. It works! Is this address ($66) fixed or is likely to change with subsequent releases of fossimon? If it's fixed, I could add a fmon pseudo instruction to the 48kb version of Specasm which would take you directly into the monitor when executed. The Next version of Specasm has an nbrk instruction which does a nextreg 8, 2 or maybe nextreg 2,8 (don't remember which) that launches the Next debugger when executed, and which is extremely useful for debugging. It would be great to have something similar on the Spectrum version of Specasm.
User avatar
bob_fossil
Manic Miner
Posts: 662
Joined: Mon Nov 13, 2017 6:09 pm

Re: fossimon - an NMI based monitor for divMMC and esxDOS

Post by bob_fossil »

markusr wrote: Fri Apr 26, 2024 9:18 pm That's excellent. It works! Is this address ($66) fixed or is likely to change with subsequent releases of fossimon? If it's fixed, I could add a fmon pseudo instruction to the 48kb version of Specasm which would take you directly into the monitor when executed. The Next version of Specasm has an nbrk instruction which does a nextreg 8, 2 or maybe nextreg 2,8 (don't remember which) that launches the Next debugger when executed, and which is extremely useful for debugging. It would be great to have something similar on the Spectrum version of Specasm.
It's the behaviour of the Z80 to jump to $66 when an NMI occurs so it's unlikely to change now. :)
markusr
Drutt
Posts: 28
Joined: Sun Feb 20, 2022 3:14 pm

Re: fossimon - an NMI based monitor for divMMC and esxDOS

Post by markusr »

bob_fossil wrote: Fri Apr 26, 2024 9:32 pm It's the behaviour of the Z80 to jump to $66 when an NMI occurs so it's unlikely to change now. :)
Good to know. I should have read the comments in your example code more carefully. Perhaps an nmi pseduo instruction might more sense. I'll have a think about it. In any case, having access to the monitor via a simple call $66 is already great.
SamC
Microbot
Posts: 174
Joined: Sun Sep 29, 2019 9:07 pm

Re: fossimon - an NMI based monitor for divMMC and esxDOS

Post by SamC »

Nice work! Many thanks! Now it is easier to inspect hidden routines, especially in loaders and de-packing routines.

I also like
sm 16384 6912 "screen$ :-)

Please add zx128 (and more) Pentagon paging up to 512K, this will help to convert trdos software to the esxDOS.

incl. commands to Save and Load RAM page memory
e.g.
sp page, adr (0 to 16383), length (0 to 16383), name
or
lp page, name
User avatar
8BitSC
Microbot
Posts: 130
Joined: Mon Feb 13, 2023 1:23 am

Re: fossimon - an NMI based monitor for divMMC and esxDOS

Post by 8BitSC »

Quick question

Is it possible that, rather than bringing up a menu when pressing the NMI button, holding down another key (say, shift or symbol shift) when pressing the NMI button it could bring up the menu, or jump directly to the monitor?

Having added the new NMI.SYS, it’s now an extra key press to get to the list of games.

It’s not a major inconvenience but when I’m just looking to play games, a little frustrating not being returned back to my folder of games and instead having to press another key to get there.

Edit: Or maybe even add a key press to the fossil-browser menu, to jump into the monitor?

(Unless they both utilise the same area of RAM, that is?)

A First World issue?

Hopefully, you receive my comments as constructive rather than nit-picking. The monitor is a great little piece of software. My suggestions are entirely user experience related.
User avatar
bob_fossil
Manic Miner
Posts: 662
Joined: Mon Nov 13, 2017 6:09 pm

Re: fossimon - an NMI based monitor for divMMC and esxDOS

Post by bob_fossil »

8BitSC wrote: Thu May 02, 2024 12:56 pm Quick question

Is it possible that, rather than bringing up a menu when pressing the NMI button, holding down another key (say, shift or symbol shift) when pressing the NMI button it could bring up the menu, or jump directly to the monitor?

Having added the new NMI.SYS, it’s now an extra key press to get to the list of games.

It’s not a major inconvenience but when I’m just looking to play games, a little frustrating not being returned back to my folder of games and instead having to press another key to get there.
Originally, the monitor .SYS file just replaced the existing NMI.SYS but during development I wanted a way to still use the file browser when the monitor was active, to load files in to test the monitor with - which is how the menu came to be. On my setup, the NMI.SYS in the SYS folder is my long filename browser. When I want to use the monitor, I use the supplied .BAS file to soft load the menu NMI in (by soft load, I mean using the supplied .nmiinit dot command to swap out the current NMI.SYS on the fly). Once I'm done using the monitor, a power cycle returns me back to the normal NMI. I envisaged people dipping into this at specific times - I didn't think anyone would want to use the monitor menu system all the time. It was designed to just be a workaround to let you browse and use the monitor at the same time.
8BitSC wrote: Thu May 02, 2024 12:56 pm Hopefully, you receive my comments as constructive rather than nit-picking. The monitor is a great little piece of software. My suggestions are entirely user experience related.
I read and take in all comments and feedback. Whether I implement them, or implement them in the way the person suggested is another matter altogether. :)
SamC
Microbot
Posts: 174
Joined: Sun Sep 29, 2019 9:07 pm

Re: fossimon - an NMI based monitor for divMMC and esxDOS

Post by SamC »

8BitSC wrote: Thu May 02, 2024 12:56 pmIs it possible that, rather than bringing up a menu when pressing the NMI button, holding down another key
This was the first thing that came to my mind after installation. But the browser is still more frequent tool for me and the fossimon guide contains several solutions to get the monitor working temporarily (until reset). So in the end, I just solved the problem so I wouldn't have to bother with long commands only. With the help of .LAUNCHER I made shortcuts for quick switching

Code: Select all

.NMI1
to redirect the NMI button to the monitor (and .NMI2 for menu).

Similar BASIC programs are also available... if someone prefers, he/she can rename e.g. NMI_MON.BAS to N1.BAS and run this file with the small BASLOAD dot-command, which can be also found in the mega.io directory under the short name "L". Simply type then...

Code: Select all

.L N1
Note: Copy all files to the BIN directory. I use the eLeMeNt ZX switched to the fast Pentagon model, with the latest esxDOS 0.8.9. The .LAUNCHER and .L commands may not work with older esxDOS versions.
bob_fossil wrote: Thu May 02, 2024 10:45 pm I read and take in all comments and feedback. Whether I implement them, or implement them in the way the person suggested is another matter altogether. :)
I look forward to the next versions. :-) I dream about exporting disasm-listings to text files or choosing whether to save the part of memory with or without a +3dos header.

Anyway, already in its current state, in conjunction e.g. with the SPECASM, it is, after several years, something really fresh, finally a decent and modern development environment directly usable with the original Spectrum.
Post Reply