• Please review our updated Terms and Rules here

NABU PC Emulation under MAME

After using cpmcp to F: on the .raw hdd image and then "chdman createdhd" - it doesn't make use the correct geometry for the .chd, it uses CHS = 24,16,51 instead of the original CHS = 306,4,16. Even forcing it will not work properly for the F:, but seems to keep E: working.

I don't know enough about how this all interacts to move forward.
 
tms9918pal.png

Figure this might be useful for people dinking with color.com: note that this chart is in hex and the code expects decimal. (MAME or the Nabu hardware might not use these exact colors; this is what the TMS9918 core I used in Marduk went with.)

0 is transparent. (The 9918 had a genlock function which was used by, for example, the laserdisc video game "Cliff Hanger".)

I'm aware that color.com is a little bloated, but unfortunately, I don't know enough Z80 assembler to write it in that and had to write it in C instead.
 
After using cpmcp to F: on the .raw hdd image and then "chdman createdhd" - it doesn't make use the correct geometry for the .chd, it uses CHS = 24,16,51 instead of the original CHS = 306,4,16. Even forcing it will not work properly for the F:, but seems to keep E: working.

I don't know enough about how this all interacts to move forward.
So I had a quick look at the file and i think boottrk should be 980 not 977. That plus making maxdir 256 was enough to access drive f. I was able to copy a new file onto it and then recreate the chd file which booted and had my new file on drive f:

The command I used to create the chd file with the correct parameters is: ./chdman createhd -o hdd2.chd -f -i hdd2.raw -chs 306,4,16 -c none
 
Thanks Brijohn

Using the following in /etc/cpmtools/diskdefs:
Code:
# Nabu hard disk 2nd partition F: (don't use on .chd file; use only after converting to .raw)
diskdef nabu-hddf
    seclen 512
    tracks 1224
    sectrk 16
    blocksize 4096
    maxdir 256
    boottrk 980
    os 3
end

worked just fine (I tried 980 earlier, but the maxdir wasn't changed to 256) to access and copy to F:

Workflow to add files to hdd.chd:

1. extract .chd to .raw: chdman extracthd -i hdd.chd -o hdd.raw

copy files (cpmcp), remove files (cpmrm), or list files (cpmls) using "-f nabu-hdd" or "-f nabu-hddf" with hdd.raw
i.e. to copy file.ext to F: cpmcp -f nabu-hddf hdd.raw file.ext 0:
i.e. to list files on E: cpmls -f nabu-hdd hdd.raw

2. create .chd from .raw: chdman createhd -c none -chs 306,4,16 -i hdd.raw -o hdd-new.chd

The assumption is that you use the files earlier in the forum for the .chd so the cylinders/heads/sectors is: 306/4/16
You can verify the cylinders/heads/sectors with: chdman info -i hdd.chd)
 
I also made a manual of the Nabu Know it all. It's on archive.org, just search for "nabu know"

UOGZGK1.png
 
So I was looking at a picture of the NABU keyboard's circuit board and there's an ADC0809 8 Channel ADC.

Was this there to possibly support analog joysticks or paddles?

i3AApv0.png
 
Attached is a windows build of the chdman tool for anyone who wishes to use it on the windows platform. I've also built all of the mame tools for windows, but the zip archive is apparently too large to attach to a post. If there is another more appropriate place to park the archive, let me know.
 

Attachments

  • chdman_win.zip
    767.8 KB · Views: 4
Attached is a windows build of the chdman tool for anyone who wishes to use it on the windows platform. I've also built all of the mame tools for windows, but the zip archive is apparently too large to attach to a post. If there is another more appropriate place to park the archive, let me know.
Contact @snuci on here or via Discord and I'm pretty sure he'd be willing to host the files for you.
 
One fun thing to do is to launch mame nabu with the parameters -centronics lx810l (that's LX810L in lowercase)

and this will give you an epson printer to play with. (You can activate the printer controls from the Input/Keyboard Selection menu for FF/LF and ON LINE).

(Note that for a page to be "printed" into the snap directory, the printhead has to cross the page boundary, so do an FF to actually make the print, you will see a brief pop up message)

For some reason SYM+1 is supposed to print, but it doesn't seem to work in mame.

I was able to print in BASIC with LPRINT and LLIST.
I was able to print in LOGO with startprint and stopprint.

running .contents and poall in LOGO:

OpbuZCO.png


printing from BASIC:

S9q59jP.png
 
I saw the list of BASIC keywords on the nabu.ca site, and saw SPRITE mentioned, so let's see if we can make some sprites. Unfortunately, I tried everything I could think of to get it to do something, and I'd get syntax errors galore. Finally, I realized that the Nabu basic keywords are similar to MSX basic keywords, and could use the reference at https://www.msx.org/wiki/Category:MSX-BASIC_Instructions.

For example the page for PUTSPRITE gives the proper syntax expected: https://www.msx.org/wiki/PUT_SPRITE

I was finally able to get Nabu Basic to display a sprite and move it around with the joystick:

The program in the upper left is for 16x16 sprites on screen 1 and the lower left is 8x8 sprite on screen 1.

p3GyE1I.png
 
Golden Child,

Awesome - works pretty good - thanks for the suggestion.

I also added "-numscreens 2" to allow printer "screen" to show up in a different window.

To output the screen to printer, type: device conout:=lpt,tv

This isn't very practical when running 'nabushow' as it prints 1 line on each page of the printer.
1671772982197.png1671773061673.png
 
Last edited:
One fun thing to do is to launch mame nabu with the parameters -centronics lx810l (that's LX810L in lowercase)
Did you use another NABU-MAME as the Windows-Version?
Because when I try to start with this printer I do get the error message:
lx810l.ic3c NOT FOUND (tried in lx810l nabupc) at93c06 NOT FOUND (NO GOOD DUMP KNOWN) (tried in lx810l nabupc) Fatal error: Required files are missing, the machine cannot be run.

I can start with -centronics printer, but even with -numscreens 2 I do get only 2 times the NABU-Screen and cant set Screen#1 to printer in the Video-Options of MAME :(

Is there any way to get the output (conout) copied to a serial port like RS0/RS2 and have there also a 80 chars wide output of CP/M?

[EDIT] downloaded LX810L.zip and did put the lx810l.ic3c into the ROMS directory - but had to "Press a Key" to start because "of a bad dump"? or the at93c06 is missing?

Printer_Output.jpg
 

Attachments

  • lx810l.zip
    21.6 KB · Views: 1
Last edited:
lx810l.ic3c NOT FOUND (tried in lx810l nabupc)

You have to find the lx810l rom that contains the above file.

Once you have that file in place the second screen will become the printer output (screen #1)
 
Did you use another NABU-MAME as the Windows-Version?
Because when I try to start with this printer I do get the error message:
lx810l.ic3c NOT FOUND (tried in lx810l nabupc) at93c06 NOT FOUND (NO GOOD DUMP KNOWN) (tried in lx810l nabupc) Fatal error: Required files are missing, the machine cannot be run.

I can start with -centronics printer, but even with -numscreens 2 I do get only 2 times the NABU-Screen and cant set Screen#1 to printer in the Video-Options of MAME :(

Is there any way to get the output (conout) copied to a serial port like RS0/RS2 and have there also a 80 chars wide output of CP/M?

You see the errors because need the roms for the lx810l printer. (or the ap2000, they are virtually identical) (Jeffery Stone beat me to it).

The "printer" device writes data to a file, but doesn't display it. I noticed that it doesn't seem to work quite right as I specify -printout out.txt on the command line and it gives an error saying Fatal error: Device Printer load (-printout out.txt) failed: No such file or directory. I have to create out.txt with "echo > out.txt" before I launch mame.

Somewhere around my files I made a centronics to rs232 adapter in mame, that was a couple of years ago...then you could pipe it to one of the rs232 devices.

Doesn't CP/M have the CTRL+P to toggle output to the printer?
 
Last edited:
This isn't very practical when running 'nabushow' as it prints 1 line on each page of the printer.
Hi Jeffery, I wonder if nabushow is generating a FF (form feed 0x0c) character when in prints.

If you reset lx810l printer while holding LF and FF, make sure the printer keypad is enabled in the Input/Keyboard menu (so hold keypad 7 and 9 while tapping keypad 2 for reset) you can put it into data dump mode and it will give a hex dump of exactly what it sees.
 
Back to the ver14, ver17, and ver29 not showing "1. Cable" after a reset.

For me the latest compiled version from Brijohn does show "1. Cable" on boot only for above roms, but after a soft reset (F3) or hard reset (L-Shift F3) that option disappears.

I can make it reappear without quitting if I do the following:
1. Use the UI Menu and set the Slot Devices -> hcca from "null_modem" -> "empty slot"
2. Arrow to "Reset System" in UI Menu
3. Wait for restart
4. Use the UI Menu and set the Slot Devices -> hcca from "empty slot" -> "null_modem"
6. Arrow to "Reset System" in UI Menu
7. Wait for restart

"1. Cable" appears again and works fine.

My guess is that soft and hard reset must not be clearing something that is cleared on normal boot up.
 
[EDIT] downloaded LX810L.zip and did put the lx810l.ic3c into the ROMS directory - but had to "Press a Key" to start because "of a bad dump"? or the at93c06 is missing?
the at93c06 is the nvram for the printer I think, the printer will write some defaults into it and you'll have a file inside your nvram directory. There's no dump of that, so it just gives a warning.
 
"1. Cable" DOESN'T show up after booting CP/M from floppy or hard disk and resetting with F3 (ver14, ver17, and ver29).

Using ver29 with floppy and hard disk enabled, I went into the debugger and noticed if you set the below values and hit F3:

Address FFFE and FFFF:
Default = A5 5A​
Set values to anything other than default, i.e. FF FF or 00 00 will result in a full reset when hitting F3​

Or you can manipulate these individually:
Address FFEC:
AA = Floppy (autoboot depends on FFE9 below)​
E8 = Autoboot Hard Disk​
55 = Autoboot Cable​
?? = Values other than above will cause "BOOT ERROR" and then the "1. Cable" and other options will appear and work fine.​
Address FFE9: (when using FFEC:AA above)
00 = prompts "INSERT SYSTEM DISK IN DRIVE A: AND PRESS GO"​
01 = Autoboot Floppy​
Not sure if this is the proper entrypoint for this or if this helps at all trying to troubleshoot why "1. Cable" missing after a mame restart.
 
Last edited:
"1. Cable" DOESN'T show up after booting CP/M from floppy or hard disk and resetting with F3 (ver14, ver17, and ver29).

Using ver29 with floppy and hard disk enabled, I went into the debugger and noticed if you set the below values and hit F3:

Address FFFE and FFFF:
Default = A5 5A​
Set values to anything other than default, i.e. FF FF or 00 00 will result in a full reset when hitting F3​

Or you can manipulate these individually:
Address FFEC:
AA = Floppy (autoboot depends on FFE9 below)​
E8 = Autoboot Hard Disk​
55 = Autoboot Cable​
?? = Values other than above will cause "BOOT ERROR" and then the "1. Cable" and other options will appear and work fine.​
Address FFE9: (when using FFEC:AA above)
00 = prompts "INSERT SYSTEM DISK IN DRIVE A: AND PRESS GO"​
01 = Autoboot Floppy​
Not sure if this is the proper entrypoint for this or if this helps at all trying to troubleshoot why "1. Cable" missing after a mame restart.
So if you are doing a soft reset (F3) I would not expect you to get a boot menu at all. It should just boot with the last boot device you selected, as far as i am aware thats how the real hardware works as well. Doing a hard reset (Shift F3) should give you the full boot menu. I think the issue there is that there is a problem reestablishing the tcp link to the IA and therefor the rom thinks you don't have a adapter installed. I tested doing a hard reset using -hcca hcca_adapter which uses the small bultin adapter for loading homebrew and then this behaved as expected.

Just checked and its definitely a weird mame bug on the hard reset. Basically mame does the tcp bit-banging byt open a "file" called socket.<host:port>. The prefix socket. tells mame its not a real file, but rather a tcp socket. The problem seems to be how mame is handling this on a hard reset. When that happens for whatever reason it is not opening a tcp connection, but simpley creating a locale file called in this case socket.127.0.0.1:5816 on your disk and writing data to it. I am unsure why this is happening but it seems likely to be an issue with mame rather then this particular core. I might do some digging if i have the time.
 
Last edited:
So if you are doing a soft reset (F3) I would not expect you to get a boot menu at all. It should just boot with the last boot device you selected, as far as i am aware thats how the real hardware works as well. Doing a hard reset (Shift F3) should give you the full boot menu. I think the issue there is that there is a problem reestablishing the tcp link to the IA and therefor the rom thinks you don't have a adapter installed. I tested doing a hard reset using -hcca hcca_adapter which uses the small bultin adapter for loading homebrew and then this behaved as expected.
Not a problem.
 
Back
Top