226

Re: New NMI handler / .commands

david_ps wrote:

There is very low room for NMI code, any option of this type requires a lot of it. It's possible implement it with a file of fixed with fields, [EXT][COMMAND] (a binary file). A very basic error check is possible, but everything resides in how well built the configuration file is.

I've seen that any file that has no specified behaviour, when you select it, it is displayed on screen as hex values. Are you calling hexview for this? In that case, something that could be done is to use a (hopefully small) dot command as a command relay: any non associated file would be directed to this command, and the task of this command would be to search for appropiate command to handle the file, and if it cannot find anyone, then perform the default behaviour (display it in hex)

227 (edited by david_ps 2018-02-22 07:05:06)

Re: New NMI handler / .commands

New release of NMI navigator, v.0.0.15:
https://www.dropbox.com/s/otrwpmpg1jx2l … 5.zip?dl=0
https://www.dropbox.com/s/yabd22iv15qd6 … 5.zip?dl=0
Changes:

  • M Max overlay size changed to 693 bytes, need recompile custom module.

  • E, DELETE now deletes directories recursively. Needs rm dot command. PLEASE USE WITH CARE. Luzie wink

  • LEFT, RIGHT navigation keys have new behavior. Hood wink

  • G open MON debugger/monitor. Velesoft wink

  • OUT 255, 0 on browser start.  This OUT set standard graphic zx mode on computers Timex2048,Timex2068 and on SLAM. Velesoft wink

  • Fixed bug reported by mcleod_ideafix. mcleod wink

228

Re: New NMI handler / .commands

mcleod_ideafix wrote:

I've seen that any file that has no specified behaviour, when you select it, it is displayed on screen as hex values. Are you calling hexview for this? In that case, something that could be done is to use a (hopefully small) dot command as a command relay: any non associated file would be directed to this command, and the task of this command would be to search for appropiate command to handle the file, and if it cannot find anyone, then perform the default behaviour (display it in hex)

It's possible to use a dot command for it, there're more room for code and data. On the other hand, we must be careful when using certain functions of the ROM and the esxDOS API that do not work without a correct BASIC environment, for example when we have a game loaded. I will keep it in mind for future NMI navigator releases.

229

Re: New NMI handler / .commands

Thank you for the great new version.
What I'm trying so far works very well.

What do you think about the RTC support of Esxdos and the Spectrum NEXT or the "RTC MODULE v.03"
for the DivIDE by Velesoft?
With these extensions of an RTC chip, you may want to see the date and time of the files in NMI Navigator.
I know that you say what does he want again  wink
Best regards...

230

Re: New NMI handler / .commands

Spezzi63 wrote:

What do you think about the RTC support of Esxdos and the Spectrum NEXT or the "RTC MODULE v.03"
for the DivIDE by Velesoft?
With these extensions of an RTC chip, you may want to see the date and time of the files in NMI Navigator.
I know that you say what does he want again  wink
Best regards...

As far as I know, it only allows access / modify the date and time via dot command. If you intend to modify the date and time of the files, it is only possible to do so if the esxDOS API implements it. At the moment I have not found any function that does it.

231

Re: New NMI handler / .commands

david_ps wrote:

As far as I know, it only allows access / modify the date and time via dot command. If you intend to modify the date and time of the files, it is only possible to do so if the esxDOS API implements it. At the moment I have not found any function that does it.

Hi David,

Date/time from RTC.SYS is used only when creating or updating a file.

Thanks

232 (edited by Luzie 2018-02-22 13:52:24)

Re: New NMI handler / .commands

david_ps wrote:

New release of NMI navigator, v.0.0.15:
...
E, DELETE now deletes directories recursively. Needs rm dot command. PLEASE USE WITH CARE. Luzie wink

Thanks! I´ll try!

david_ps wrote:

G open MON debugger/monitor. Velesoft wink

From which path is MON loaded? I copied it to \bin but on pressing G i get esxDOS Error 5 (="No such FILE or DIR")

233

Re: New NMI handler / .commands

Luzie wrote:

From which path is MON loaded? I copied it to \bin but on pressing G i get esxDOS Error 5 (="No such FILE or DIR")

From /BIN on system disk, like rm, snapload, hexview...

234 (edited by Luzie 2018-02-22 19:21:19)

Re: New NMI handler / .commands

david_ps wrote:
Luzie wrote:

From which path is MON loaded? I copied it to \bin but on pressing G i get esxDOS Error 5 (="No such FILE or DIR")

From /BIN on system disk, like rm, snapload, hexview...

It´s there (and can be manually run with .mon), but I get this Error 5.

I will try on real hardware or look further whats wrong...

Should be an error with my script with creates a .HDF-File for testing on Emulators.

235

Re: New NMI handler / .commands

david_ps wrote:
Luzie wrote:

From which path is MON loaded? I copied it to \bin but on pressing G i get esxDOS Error 5 (="No such FILE or DIR")

From /BIN on system disk, like rm, snapload, hexview...

I found my error. I missed to copy new \sys\nmi\debug
Now error 5 has gone!

236 (edited by Uto 2018-02-22 23:19:24)

Re: New NMI handler / .commands

I have just tried new NMY.SYS version with Nextipede game, a game using Timex HiColor mode, cause a I had a terrible feeling after reading changelog, and my feeling was confirmed:

That OUT 255,0 Velesoft asked for - not sure why - is not a good idea in my opinion. That OUT sets normal video mode, but if you try to use the NMI menu while playing a non standard video mode game - to poke or to make an snapshot for instance - the menu will be ok, but when you get back to game the screen mode is lost. So unless you find a way to determine which mode was active before the menu is called to restore it before returning to game - which I belive is not possible - I don't think that OUT should be there.

At least in the previous versions you could poke and save snapshots, even if the NMI menu was not well looking, but now those games cannot be saved or poked properly anymore.

Velesoft, if you can point out the reason behind your request maybe I change my mind, but at the moment to be honest I only see bad effects on that OUT.

Note: I've tried Nextipede in ZX-Uno, that does also support Timex Modes.

PS: it also affects any games using bank selector to use by the horizontal MMU in Timex machines and ZX-Uno, or screen in shadow RAM, what implies at least one in development I know.

237 (edited by Uto 2018-02-22 23:30:26)

Re: New NMI handler / .commands

david_ps wrote:
mcleod_ideafix wrote:

I've seen that any file that has no specified behaviour, when you select it, it is displayed on screen as hex values. Are you calling hexview for this? In that case, something that could be done is to use a (hopefully small) dot command as a command relay: any non associated file would be directed to this command, and the task of this command would be to search for appropiate command to handle the file, and if it cannot find anyone, then perform the default behaviour (display it in hex)

It's possible to use a dot command for it, there're more room for code and data. On the other hand, we must be careful when using certain functions of the ROM and the esxDOS API that do not work without a correct BASIC environment, for example when we have a game loaded. I will keep it in mind for future NMI navigator releases.

Another option is not making a config file, but just when enter is pressed on a non-recognized file extension, you call a specific module with HL pointing to ASCIIZ filename, and you make that extension do nothing by default (just RET). Then is up to others to replace that extension with something else (that may include calling to dot commands, loading a third extension in place depending on extension or whatever).

Also, you say custom modules have allways to be recompiled for new versions. I assume if you don't use absolute jumps/calls that is not the case, is it? Also, correct me if I'm wrong, that happens cause you always load the modules just after your main module code, what means that depending on main module length, the start position of the module changes, but what if you load them at the end of free space instead? That way if for instance the last avaliable address for NMI.SYS is $2000 (just guessing) the module author  knows its code is going to be at $1900 if its length is $100, no matter if main code ends at $1800 or $17AB.

238

Re: New NMI handler / .commands

AGD games and problems with graphic modes

Now AGD support also Timex graphic mode (hardware multicolor with attributes size 8x1 instead 8x8). Graphic modes are switchable via writing to port 255. On real Timex computers is port 255 also readable, but on real ZX is port 255 used for synchronisation screen in some games. SLAM PLUS ula replacement add Timex graphic modes to original ZX computers, bus port 255 is here only for writing. As I know, then is impossible read back which graphic mode is set. Next problem is graphic incompatibility with other interfaces as DIVIDE/DIVMMC, etc... All original ZX software and ZX hardware (with own systems) is designed for original ZX graphic mode. If AGD game set multicolor mode and you jump to NMI menu i system ESXDOS, then multicolor mode is set and browser is bad visible thanks to different attributes positions.

Here is result:
- for full compatibility (only visual problems..) must system before own screen access (if need original ZX mode, for example for show file browser) use OUT 255,0 for set standard ZX mode.
- if system also support return from own menu/browser back to game/program, then don't need any next modifications, but if AGD game is designed for run in multicolor mode then must always set multicolor. Not exist any correct way for 100% software detection which graphic mode is set, but AGD may eliminate all this problems if set multicolor graphic mode after each interrupt. Then after return from ESXDOS filebrowser will game set always correct GFX mode.

Short result:
- add OUT 255,0 after jump to NMI code
- add OUT 255,xx (multicolor) at begin of interrupt code in AGD games.

239

Re: New NMI handler / .commands

If anyone know any software with Timex graphic support please send me link, I will fix all. Where I can download NEXTIPEDE ?

240

Re: New NMI handler / .commands

Velesoft: the ULAplus specification allows for an alternative method to read back the contents of port 255. See here: https://faqwiki.zxnet.co.uk/wiki/ULAplus . SLAM probably already implements that.

ZX-UNO doesn't implement that port mirroring yet, but does implement proper port 255 read when Timex MMU is enabled.

241

Re: New NMI handler / .commands

mcleod_ideafix wrote:

Velesoft: the ULAplus specification allows for an alternative method to read back the contents of port 255. See here: https://faqwiki.zxnet.co.uk/wiki/ULAplus . SLAM probably already implements that.

As I know then no, SLAM ula enable only writing to port 255.

And here is my fixed version of NEXTIPEDE game (now set graphic mode under interrupt)
https://velesoft.speccy.cz/other/nextipede_im2.zip

242

Re: New NMI handler / .commands

Hi Velesoft,

In my  opinion NMI handler should be transparent to games and since that OUT 255,0 it isn't.  I understand your intention was making the NMI handler be always visible without strange effects due to attributes position, but that solution is interferring with the game itself, what should be against any NMI handler, and I think the remedy is worse than the disease.

Yes, you can patch games, but it's a very bad idea having to patch games cause that was added to NMI menu. Most people won't ever find your patched version of Nextipede, nor will even realize a patched version exist for this or any other future games, if any patch does ever exist for future games.

Also, is not only about graphic mode, that OUT 255,0 also clears bits 0 and 7, what may change the video RAM active and also the MMU paging. Imagine a game has the proper game screen in shadow RAM (bit 0 = 1) and an inventory at normal video RAM (bit 0 = 0), when you get back to the game, inventory would be main screen!

Really, I belive that OUT 255,0 is a very bad idea unless you can read the port before, and then set it to same value it was before exiting. As it seems that is impossible for many devices, including I'd rather remove that OUT 255,0 from the NMI handler, or at least make it optional somehow.

Is that possible DrSlump? (making that out optional, like having a settings file)

243

Re: New NMI handler / .commands

I know, better and more correct way is true detection if port is readable. It's possible on real Timex computer. But what about SLAM users ? SLAM ULA support Timex modes, but GFX port is not readable. Idea is make standard = each zx software which support extra graphic modes must in neverending cycle (often/under interrupt or sometime) refresh setup on GFX port. This way is correct and any other zx software(NMI code) don't need any extra detections if any port exist, etc. NMI at begin may only set ZX graphic to default state and after return each program set own extra graphic modes back.

About bit 0 and 7 on port 255: if browser need set original ZX graphic mode and first videoram, then must always write zero value to port 255. All existing versions of NMI browsers also rewrites state of port 7FFD, because use only software detection of current ram page and videoram bit is also always reset (set to first videoram).

For HI-RES and HI-COLOR modes not exist software support (oh yes, sorry, one demo and one game...). Then now is ideal time before software production set some rules (- each new game may active own graphic mode each interrupt. This don't need more memory and don't need more cpu time. It may only help).

What about higher bits on port 255 ? As I know then Timex ans SLAM use only some low bits...

244 (edited by Uto 2018-02-23 14:04:00)

Re: New NMI handler / .commands

I belive the standard should be making the port readable at hardware level for all devices, or any standar mode to get the current configuration. A "good practices" standar only becomes a will, you depend on developers who first must follow the standard - what for sure won't happen always - and then they need to have time in each interrupt to "refresh" the graphic mode, which for some games may be as simple as sending an OUT, and for other games may imply checking first which video RAM option was selected, or if MMU bit was on/off, what may lead to longer interrupt routine, what is not always possible, specially in Timex modes where you have to write almost twice more information per frame than in normal mode.

I know is late for hardware solutions, if SLAM ULA does not support it, and unless SLAM ULA contains some kind of CPLD that may be rewritten, but IMO it's better to fix that in hardware (real Timex computers already support it, ZX-Uno does not completely but most probably is possible, and it should also be possible as well on Prism, Next, and whatever other clone to come). So if we talk about standars, I'd rather go the hardware way, not the software way :-)

On the other hand, any hardware standard may be expanded to include other modes as the radastan mode from ZX-Uno and other non standard modes like those on Prism, ZX-Evo, Next, etc.

245

Re: New NMI handler / .commands

By the way, there are not many Timex games, and although this feature affects also any game using Timex shadow video RAM, what includes AFAIK one radastan mode game, in the end they are not that many, so don't take my posts as so negative. I belive is better fixing than patching, that's all.

Maybe DrSlump reads this and tell us is converting wether to issue an OUT (255),0 or not into a setting, or maybe make a menu key that issues that OUT, or at least let me know where that OUT is placed in NMI.SYS so I can patch it myself ;-)

I gues maybe two first bytes...

246 (edited by david_ps 2018-02-23 22:47:44)

Re: New NMI handler / .commands

Hi, it's possible to control execution of OUT (255),0 by a flag on nmi.cfg. Please edit byte 0 of nmi.cfg and change value 0 by 1 and load NMI navigator wink It's possible to do something similar for the OUT instruction.

247

Re: New NMI handler / .commands

Uto wrote:

Another option is not making a config file, but just when enter is pressed on a non-recognized file extension, you call a specific module with HL pointing to ASCIIZ filename, and you make that extension do nothing by default (just RET). Then is up to others to replace that extension with something else (that may include calling to dot commands, loading a third extension in place depending on extension or whatever).

There's a lot of different options. Specifically, if you replace hexview by a custom module called hexview, you have that smile

248

Re: New NMI handler / .commands

Uto wrote:

Also, you say custom modules have allways to be recompiled for new versions. I assume if you don't use absolute jumps/calls that is not the case, is it? Also, correct me if I'm wrong, that happens cause you always load the modules just after your main module code, what means that depending on main module length, the start position of the module changes, but what if you load them at the end of free space instead? That way if for instance the last avaliable address for NMI.SYS is $2000 (just guessing) the module author  knows its code is going to be at $1900 if its length is $100, no matter if main code ends at $1800 or $17AB.

This is due to the internal structure of the NMI navigator:

+---------------------------+
| Init code                 |
| Main loop                 |
| Exit code                 |
+---------------------------+
| Navigation functions      |
| GUI functions             |
| Overlay system            |
+---------------------------+
| Data area                 |
|    ...                    |
|    Overlay buffer         |
+---------------------------+

I can put Overlay buffer after Init code, just before Main loop, but the problem persists.  For example, all code related to OUT instruction is in Init code area.

249

Re: New NMI handler / .commands

Luzie wrote:
david_ps wrote:
Luzie wrote:

From which path is MON loaded? I copied it to \bin but on pressing G i get esxDOS Error 5 (="No such FILE or DIR")

From /BIN on system disk, like rm, snapload, hexview...

I found my error. I missed to copy new \sys\nmi\debug
Now error 5 has gone!

Luzie, always replace old version files with everything that comes in the ZIP of the new release, do not replace single files.

250 (edited by Uto 2018-02-23 22:58:36)

Re: New NMI handler / .commands

But overlays are loaded in the overlay buffer? Then why not aligning them to the end of the overlay buffer instead of to the beginning?

This:

+---------------------------+
| Init code                       |
| Main loop                      |
| Exit code                       |
+---------------------------+
| Navigation functions       |
| GUI functions                 |
| Overlay system              |
+---------------------------+
| Data area                      |
|    ...                              |
|  empty space                 |
|    Loaded Overlay           |
+---------------------------+

Instead of this:

+---------------------------+
| Init code                       |
| Main loop                      |
| Exit code                       |
+---------------------------+
| Navigation functions       |
| GUI functions                 |
| Overlay system              |
+---------------------------+
| Data area                      |
|    ...                              |
|    Loaded Overlay           |
|  empty space                 |
+---------------------------+