26

Re: New NMI handler / .commands

david_ps wrote:

The following options are currently implemented:
*V view .scr screen file

Am I wrong or is V not working? I have e.g. bonkers.scr in root-directory of SD-Card and it displays just a random coloured screen.

Suggestion: Original esxDOS 0.86/NMI.SYS has Help-File/Screenfile "nmi_help.scr" which it displays while pressing H for Help.
Maybe something like this can be done to your new NMI.SYS?
(Artists here in Forum: Maybe someone willing to do a proper logo for new NMI.SYS/nmi_help.scr ;-))?

Can V just load every first 6912 bytes of any file (.SCR, .TAP, .XXX) into Screen-Memory from 16384? Does .API or .TAPEin support "partial" load from files which are bigger size than 6912 Bytes?

Cheers,

Luzie

27

Re: New NMI handler / .commands

Kempston Joystick detection +reading.
After each interrupt in filebrowser we must call detection routine which detect if kempston port 31 contain correct data, else disable kempston controll.

;This code read kempston joystick port and detect if port contain correct data. If detect any incorrect states then disable all next reading of joystick port and always return value 0.
KEMPSTON: EI
HALT
XOR A
HERE: CALL DETECTJOY  ;test/read joystick always after interrupt
LD A,B
RET NZ ;detected correct joystick data
LD A,201 ;code of instruction RET (modifiing code for disable next reading joy port)
LD (HERE),A ;detected incorrect joystick data, then disable next joystick testing and will return alway 0
RET

DETECTJOY: IN A,(31)
AND 31
LD B,A ;backup joy state
AND 15 ;testing only directions
CP 3  ;detected incorrect state right+left
RET Z
CP 12 ;detected incorrect state up+down
RET Z
CP 15 ;detected incorrect state left+right+up+down
RET

In filebrowser you can use one CALL KEMPSTON and code return in register A usable value.
Now is time for testing direction: (you must always test full byte, not only active bits for corresponding directions. It's not game but filebrowser....)
CP 1 ;right
CALL Z,RIGHT
CP 2 ;left
CALL Z,LEFT
CP 4 ;down
CALL Z,UP
CP 8 ;up
CALL Z,DOWN
CP 16 ;fire
CALL Z,FIRE
.... here is CPU if is detected more active directions (for example on some models of SEGA GENESIS gamepads), you can ignore this states.

28

Re: New NMI handler / .commands

Luzie wrote:
david_ps wrote:

The following options are currently implemented:
*V view .scr screen file

Am I wrong or is V not working? I have e.g. bonkers.scr in root-directory of SD-Card and it displays just a random coloured screen.

Suggestion: Original esxDOS 0.86/NMI.SYS has Help-File/Screenfile "nmi_help.scr" which it displays while pressing H for Help.
Maybe something like this can be done to your new NMI.SYS?
(Artists here in Forum: Maybe someone willing to do a proper logo for new NMI.SYS/nmi_help.scr ;-))?

Can V just load every first 6912 bytes of any file (.SCR, .TAP, .XXX) into Screen-Memory from 16384? Does .API or .TAPEin support "partial" load from files which are bigger size than 6912 Bytes?

Cheers,

Luzie

V only works with .scr, binary images of screen+attributes area of speccy (offset 16384, size 6144+768). I think that is best to implement a dot command for view that files.

29

Re: New NMI handler / .commands

Velesoft, thanks for the info, I try it on next release

30 (edited by Luzie 2017-09-16 22:30:44)

Re: New NMI handler / .commands

david_ps wrote:

V only works with .scr, binary images of screen+attributes area of speccy (offset 16384, size 6144+768). I think that is best to implement a dot command for view that files.

esxDOS +3 command

LOAD *"filename.scr"CODE 16384,6912

loads first 6912 Bytes from a file (which can .txt, .scr or .xxx) into screen-memory without an error-message when file-len is <> 6912 Bytes.

Standard Spectrum BASIC will show an error if the file is e.g. longer than 6912 Bytes.

I will suggest a .loadbin DOT-command in this forum :-)
here: http://board.esxdos.org/viewtopic.php?pid=370#p370

31 (edited by Luzie 2017-09-18 19:54:18)

Re: New NMI handler / .commands

david_ps wrote:

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

So I think you are busy at work... may I ask what you think about adding the possibility to "chain-load" the "old" NMI.SYS (e.g. renamed to NMI_OLD.SYS) from your NMI.SYS? So we can have those functions not yet implemented in your NMI-handler like attaching of .TRD-Files.

32

Re: New NMI handler / .commands

Luzie wrote:

So I think you are busy at work... may I ask what you think about adding the possibility to "chain-load" the "old" NMI.SYS (e.g. renamed to NMI_OLD.SYS) from your NMI.SYS? So we can have those functions not yet implemented in your NMI-handler like attaching of .TRD-Files.

I had already thought about this idea, I need to experiment to see the best way to do it. The way to load it can not be from the NMI handler itself, perhaps a loader from screen memory?! smile

33

Re: New NMI handler / .commands

Please try it: https://www.dropbox.com/s/3u65l77ne6qo3by/v004.zip?dl=0
Unzip it on /sys folder
H for help
smile

34 (edited by Luzie 2017-09-19 18:55:22)

Re: New NMI handler / .commands

david_ps wrote:

Please try it: https://www.dropbox.com/s/3u65l77ne6qo3by/v004.zip?dl=0
Unzip it on /sys folder
H for help
smile

Looking very good! Only thing I discover now is cursor jumping without a keypress. Do you implement/enable Kempston support? This maybe the cause because than I must try to configure Kempston-Joystick in Emulator SpecEmu which I use for testing at this moment.
-> ... Update: I got my USB-Gamecontroller working, enable Kempston and this works OK in NMI.SYS. But when I disable Kempston in Emulation, the Cursor jumps sometimes by itself. Maybe there something wrong with "Is Kempston present"-checking-Routine?

While selecting a .SCR to view with Kempston-Joystick-Button, we need to press a key on the keyboard to return to NMI.SYS. Can you please implement to return via Kempston-Joystick-Button?

35 (edited by velesoft 2017-09-19 19:57:52)

Re: New NMI handler / .commands

Yes, if kempston joystick interface is not connect to ZX then filebrowser controll is random... You don't read kempston port soon after HALT ?

If kempston joystick interface is connect then controll is correct, but cursor movement is slower than keyboard controll

Next bug: if you press key V on any SNA file then must show screen from correct position, not only first 6912 bytes from begin of file. On other filetypes may show data from begin. Before loading erase screen data(set white paper+black ink as in basic before load screen$) because current version load data to filebrowser text...

And please accept only one key in one time in filebrowser. Also only one direction of joystick.

This version backup screen data to SD card ? It's very slow, after press NMI I must wait 5 second to show filebrowser.

36

Re: New NMI handler / .commands

velesoft wrote:

Next bug: if you press key V on any SNA file then must show screen from correct position, not only first 6912 bytes from begin of file. On other filetypes may show data from begin.

I don´t agree here with you Velesoft. NMI-browser should only display .SCR right. Not other filetypes like .SNA where Screen-Data comes after +XX Offset-Bytes. But it´s up to the New NMI-Handler-author to decide ;-)

37 (edited by velesoft 2017-09-20 04:08:48)

Re: New NMI handler / .commands

Luzie wrote:

I don´t agree here with you Velesoft. NMI-browser should only display .SCR right. Not other filetypes like .SNA where Screen-Data comes after +XX Offset-Bytes. But it´s up to the New NMI-Handler-author to decide ;-)

This feature work in original NMI and is very good for visual control of saved snapshots before loading.

38

Re: New NMI handler / .commands

velesoft wrote:

Yes, if kempston joystick interface is not connect to ZX then filebrowser controll is random... You don't read kempston port soon after HALT ?

If kempston joystick interface is connect then controll is correct, but cursor movement is slower than keyboard controll

This is a first try on Kempston control, in ZXSpin it works ok, I must test it on a real machine (I have a Superfo ZX Nuvo 128 and two speccy+ issue 6a, but I don't have a joystick!) I'm working on it.

39

Re: New NMI handler / .commands

velesoft wrote:

This version backup screen data to SD card ? It's very slow, after press NMI I must wait 5 second to show filebrowser.

Yes, all versions backup screen data to SD card. I plan to modify it soon using esxDOS RST $30 system call.

40

Re: New NMI handler / .commands

velesoft wrote:

Next bug: if you press key V on any SNA file then must show screen from correct position, not only first 6912 bytes from begin of file. On other filetypes may show data from begin. Before loading erase screen data(set white paper+black ink as in basic before load screen$) because current version load data to filebrowser text...

This functionality is not finished yet, I think we should work on a dot command that displays different types of files. Anyway, it is quite easy to implement a screen viewer for snapshots. I take note.

41

Re: New NMI handler / .commands

velesoft wrote:

And please accept only one key in one time in filebrowser. Also only one direction of joystick.

What do you mean exactly?

42 (edited by david_ps 2017-09-20 12:03:51)

Re: New NMI handler / .commands

I update yesterday version https://www.dropbox.com/s/3u65l77ne6qo3by/v004.zip?dl=0 smile
Changes:
* Velesoft, I use your kempston joystick code, thanks!
* View function modified to display SNA screen too.
* Try backup screen data to RAM first, then to disk if to RAM fails.

Luzie, please test O and F options wink

43

Re: New NMI handler / .commands

david_ps wrote:
velesoft wrote:

And please accept only one key in one time in filebrowser. Also only one direction of joystick.

What do you mean exactly?

Some ZX games test each direction separately (test only state of corresponding bit in byte). Then software may accept move UP also if you press RIGHT+UP directions on joystick. It's not good for filebrowser (test your previous version with combinations of two directions....). Is only one correct way = accept only one active direction(bit) in one time:
CP 1 ;only right
CALL Z,RIGHT
CP 2 ;only left
CALL Z,LEFT
.....

Also is possible detect joystick with more fire buttons (if byte readed from port 31 return bit D7 in log.0) and test seconf fire button on bit D5 (test via CP 32)

44

Re: New NMI handler / .commands

david_ps wrote:

I update yesterday version https://www.dropbox.com/s/3u65l77ne6qo3by/v004.zip?dl=0 smile
Changes:
* Velesoft, I use your kempston joystick code, thanks!
* View function modified to display SNA screen too.
* Try backup screen data to RAM first, then to disk if to RAM fails.

Luzie, please test O and F options wink

I test it, but all is not fixed.... joystick code is not fixed (old version), SNA screen view is incorrect, backup videoram to divmmc ram work.

45

Re: New NMI handler / .commands

velesoft wrote:

I test it, but all is not fixed.... joystick code is not fixed (old version), SNA screen view is incorrect, backup videoram to divmmc ram work.

Mine seem to work OK (Kempston and SNA Screen view tested) under SpecEmu.

46 (edited by Luzie 2017-09-20 21:39:53)

Re: New NMI handler / .commands

david_ps wrote:

I update yesterday version https://www.dropbox.com/s/3u65l77ne6qo3by/v004.zip?dl=0 smile
Luzie, please test O and F options wink

O and F run well for me - thanks!
Could you please add "quit (V)iew and go back to file-list" with a press on the Kempston Joystick :-)

Hope to see "Dr Slump" Graphic in NMI Help-Screen :-) (e.g. with tool: https://sourceforge.net/projects/scrplus/ ) and new version number 0.05 :-)

47

Re: New NMI handler / .commands

velesoft wrote:
Luzie wrote:

I don´t agree here with you Velesoft. NMI-browser should only display .SCR right. Not other filetypes like .SNA where Screen-Data comes after +XX Offset-Bytes. But it´s up to the New NMI-Handler-author to decide ;-)

This feature work in original NMI and is very good for visual control of saved snapshots before loading.

OK. Point for you! It works on original NMI and than it should work on new NMI. In the future maybe someone could write a more extensive file-viewer as .DOT-Command :-)

48

Re: New NMI handler / .commands

big_smile https://www.dropbox.com/s/iifiqp8oz7y8oby/v005.zip?dl=0 big_smile

All?!

Please press the H key

49 (edited by Spezzi63 2017-09-22 00:16:01)

Re: New NMI handler / .commands

Very good progress.

It can be seen what work this has to do.
When ub880d had his work with the NMI, we could not support him
(The new .ls command also has very good quality)
I hope that the copy command gets some revision.

An idea would be to add a note to the USR 15616 command if load Disk to start TR-Dos.
And how about a switch between disk or tape as input wink

Continued success,
Günter

50 (edited by Luzie 2017-09-22 06:30:40)

Re: New NMI handler / .commands

david_ps wrote:

big_smile https://www.dropbox.com/s/iifiqp8oz7y8oby/v005.zip?dl=0 big_smile

All?!

Please press the H key

Again: Good work! But when I try to attach a .TRD-Image to Drive A: with a press of key A I only get "ESXDOS error 5". Using old NMI.SYS via J attaches TRD-file without problem.

http://forum.tlienhard.com/phpBB3/download/file.php?id=6674