1

Topic: New NMI handler / .commands

Hi, I'm interested in write a new NMI handler and new dot commands. It's an API/documents available for do it?

2

Re: New NMI handler / .commands

dot commands:

org 0x2000
Allowed size is ~7k.
HL points at the basic command after the initial dot invoke.  The command line ends in 0x0d, ':' or \0.

On return:
; If you exit with carry set and A<>0, the corresponding error code will be printed in BASIC.
; If carry set and A=0, HL should be pointing to a custom error message (with last char +$80 as END marker).
; If carry reset, exit cleanly to BASIC

3

Re: New NMI handler / .commands

Thanks AA, I have some information on dot commands and NMI handler (disassembly mainly), but I need a complete API info to do serious job.

4

Re: New NMI handler / .commands

There is enough information here to do most things:

esxdos defines:
https://github.com/z88dk/z88dk/blob/mas … _esxdos.m4

esxdos api comments in source files:
https://github.com/z88dk/z88dk/tree/mas … esxdos/z80

5 (edited by david_ps 2017-09-10 11:49:43)

Re: New NMI handler / .commands

Hello, I'm working in a new NMI handler for ESXDOS v0.8.6. I implement a new navigator (the navigation keys are the same: Edit, Up, Down, Left, Right, Enter, Space) and I'm working in new functions: P-Poke, L-Lock page register and even more. Actually used 2890 bytes of 3594, there is a lot of room available yet for new functions.
It's usable:  load tapes and snapshots, poke memory, lock it's functional, but i don't have enough information for continue working on it, mainly related to ESXDOS API.
If you want to test it, there is a copy on https://www.dropbox.com/s/nds242mhkapexhi/NMI.sys?dl=0

6

Re: New NMI handler / .commands

I'ts neccesary a TMP folder on root directory of SD card to save screen on NMI

7

Re: New NMI handler / .commands

david_ps wrote:

If you want to test it, there is a copy on https://www.dropbox.com/sh/t78uhx1e7vwf … q_I6a?dl=0

Very good work.
The 64 character mode for possible display of LFN is good to look at.
Please develop further wink

8 (edited by Luzie 2017-09-06 06:03:57)

Re: New NMI handler / .commands

david_ps wrote:

Hello, I'm working in a new NMI handler for ESXDOS v0.8.6. I implement a new navigator (the navigation keys are the same: Edit, Up, Down, Left, Right, Enter, Space) and I'm working in new functions...

Well I too really like it!

Maybe I suggest you some things you may think over adding them if you like:

NMI menu joystick usable (Kempston and/or Sinclair 6-0)
http://board.esxdos.org/viewtopic.php?id=50

Add starting direct loading/starting of e.g. e.tap or 0,1,2,...9.tap like I described here:
http://board.esxdos.org/viewtopic.php?pid=250#p250

And my final wishes/suggestions for now: Add an option (key "m"? as R is for Reset on "original NMI.SYS") to rename files (maybe by just calling .command mv for renaming and stuffing filename which is under cursor). And a key for deleting file under cursor (e.g. key "x")?

9

Re: New NMI handler / .commands

Hello, I'm working in basic functionality of NMI browser: navigate and do actions. At this moment I use snapload dot command for execute z80 and sna files and I plan to use dot comands to do most of things. But I need more detailed information about how ESXDOS calls NMI.sys: the NMI BUFFER passed in HL (to implement snapshot  features), a more complete API information to optimize functions and size of NMI.sys, and access to new 0.9 version to implement an alternative NMI handler for it.

Luzie, when I will finish basic functionality, I will add more things like those that you suggest!

10 (edited by Luzie 2017-09-07 19:44:58)

Re: New NMI handler / .commands

Thanks lots!

Maybe you can try to get in touch with ub880d ( http://board.esxdos.org/profile.php?id=180 / https://spectrumforeveryone.com/2017/04 … mmc-enjoy/ ) who is the author of "original" NMI.SYS to get some infos you are missing about esxDOS / API.

11

Re: New NMI handler / .commands

I finished snapshot saver, works good for 48k and 128k machines! I'm optimizing some code and correct any bugs, and when I finish, I publicate new version for testing.

12 (edited by velesoft 2017-09-09 15:55:37)

Re: New NMI handler / .commands

I can help with some ideas...
More memory for NMI code, easy programming without assembler...

13 (edited by david_ps 2017-09-10 11:53:21)

Re: New NMI handler / .commands

Hello, here is the new version: https://www.dropbox.com/s/lea9c4ixzffl6k7/NMI.sys?dl=0
It can save 48k/128k snapshots, detecting existing files and autoincrementing filename numbering for avoid esxDOS error 18 smile
S-Save snapshot, P-Poke, L-Lock page register, V-View screen (only .scr)
The NMI navigator is able of list directories with 3982 entries, but I limit it to 990
Please test it!!!

Luzie, I'm working on joystick navigation. It's not possible use Sinclair 1/2 because it maps key presses (it would be necessary to change the current navigation keys: 0, 5, 6 , 7, 8), but Kempston is possible! I'm working too on rename/delete options, the next version will incorporate them. Finally, regarding to direct starting/loading file, I do not find it useful enough to spend space on it. Can you tell me exactly what you need and find a really useful solution?

Velesoft, your ideas are always welcome, your reputation precedes you. How do I contact you?

14

Re: New NMI handler / .commands

I have tested S-Save snapshot with 128k-games, P-Poke with CJ in USA, V-View screen with screens from WOS (only .scr);
no errors found.
L-Lock page register ==> I have no idea.
But with missing (R) for reset wink

15 (edited by Luzie 2017-09-11 07:00:46)

Re: New NMI handler / .commands

david_ps wrote:

Luzie, I'm working on joystick navigation. It's not possible use Sinclair 1/2 because it maps key presses (it would be necessary to change the current navigation keys: 0, 5, 6 , 7, 8), but Kempston is possible!

Would be a good start with adding Kempston!
But let me tell my ideas on Sinclair 1/2: Maybe you could do a version with Cursor (5,6,7,8,0) + Kempston
(so people using Joystick together with keyboard Cursor-Keys will be satisfied) and one alternative with Sinclair 6,7,8,9,0 + Kempston for those who mainly use "Joystick only".
"Perfect" will be a solution where we start with "Cursor+Kempston" and if someone press "9" (which is Right Sinclair Joystick "up") we change reading keys to "Sinclair 6,7,8,9,0+Kempston". But this will be most memory-consuming, so I think you won´t like it for NMI.SYS ;-)
Joystick-Keys/Ports Description: http://worldofspectrum.org/faq/referenc … #Joysticks

david_ps wrote:

Finally, regarding to direct starting/loading file, I do not find it useful enough to spend space on it. Can you tell me exactly what you need and find a really useful solution?

Should just be a "Fast-start-ramp" for some .tap-Files which have name of yet unused keys like press "w" should just load "w.tap". Just an idea which maybe isn´t to memory-consuming.

An alternative idea maybe to build a sort of menu-system: pressing e.g. "m" can maybe load and display a list of programs in
a file called "m.enu" which then could be started...

Or "f" for loading a "file-manager" which looks like your nmi.sys and have functions like rename in it. So these functions could be left out of NMI.SYS to save memory.

You see, I have much ideas :-)

btw. as "Spezzi63" mentioned: "r" for Reset should be added/brought to life :-) Thanks!

16

Re: New NMI handler / .commands

Spezzi63 wrote:

I have tested S-Save snapshot with 128k-games, P-Poke with CJ in USA, V-View screen with screens from WOS (only .scr);
no errors found.
L-Lock page register ==> I have no idea.
But with missing (R) for reset wink

Thanks Spezzi63!

L is for disabling memory paging in 128k machines, is necessary for games like all of ULTIMATE: nightshade, underwulde, pentagram, etc. Is the same thing like -l option of SNAPload dot command.

17

Re: New NMI handler / .commands

david_ps wrote:

Hello, I'm working in a new NMI handler for ESXDOS v0.8.6

Tried today with ESXDOS 0.8.5 but nothing happens when pressing NMI. I think this maybe because of .API-changes. I think it´s not your first priority to look for this backward-compatibilty?

18 (edited by david_ps 2017-09-11 18:23:59)

Re: New NMI handler / .commands

Luzie wrote:
david_ps wrote:

Hello, I'm working in a new NMI handler for ESXDOS v0.8.6

Tried today with ESXDOS 0.8.5 but nothing happens when pressing NMI. I think this maybe because of .API-changes. I think it´s not your first priority to look for this backward-compatibilty?

Luzie, the first thing I do is check that the version is 0.8.6, if it's not then returns without doing anything. There are diferences between 0.8.5 and 0.8.6 API and I don't want to lose space with checks. I can do a specific version for 0.8.5, but first I want to finish the program for 0.8.6.

19

Re: New NMI handler / .commands

Before kempston joystick controll need autodetection if kempston port exist.

20

Re: New NMI handler / .commands

Hello again, here is the new release: https://www.dropbox.com/s/pp8t07iq6647oip/NMI.sys?dl=0
I have been making changes and correcting errors in the keyboard input routine to be able to combine it with a joystick, and to be able to enter text. I change the input poke rutine and add rename and delete options.
The following options are currently implemented:
*Navigator keys changed to cursor keys and EDIT (CAPS SHIFTED 5, 6, 7, 8 and 1), ENTER, BREAK (CAPS SHIFTED SPACE)
*ENTER loads .sna, .z80 and .tap files
*S saves .sna (48k and 128k)
*L lock 128k machines paging register (like -l option of SNAPload dot command)
*P poke memory (, to separate address from value ENTER to accept value, Y to confirm)
*V view .scr screen file
*R reset wink
*N rename file (. to separate name from extension, ENTER to accept, Y to confirm)
*D delete file (Y to confirm)

21

Re: New NMI handler / .commands

I'm working in kempston joystick support, in the possibility of a configuration system (keys, type of joystick...), a "Fast-start-ramp", TRD to drive, TAP to tapein/out, select active drive for navigator, and some more surprise

22

Re: New NMI handler / .commands

velesoft wrote:

Before kempston joystick controll need autodetection if kempston port exist.

Velesoft, any suggestions? I don't have I do not have much experience in it hmm

23

Re: New NMI handler / .commands

You need to read kempston port on startup - without interface connected there should be 255 there. With interface you get 0 or at least 3 highest bits set to 0.

24

Re: New NMI handler / .commands

david_ps wrote:

Hello again, here is the new release: https://www.dropbox.com/s/pp8t07iq6647oip/NMI.sys?dl=0

WOW! Many thanks for your continuous efforts. Will test it thorough.

On first test i pressed R for rename and it makes what it should = Reset ;-)

Then I RTFM and see I should press N for (re)-naming :-)

25 (edited by Spezzi63 2017-09-14 10:14:41)

Re: New NMI handler / .commands

At this early stage, we could also call it:
*N NEW filename (. to separate name from extension, ENTER to accept, Y to confirm)

My congratulations for the successful work wink