I'm about half way through a cross platform dotnet GUI app
NABU Computer Support
Re: NABU Computer Support
Re: NABU Computer Support
It's perfect, thanks! A NABU CP/M disk image is now included in my game package.
The control is normal for a CP/M target, there is no auto-repeat so you have to press the keys repeatedly to control the space ship, the game is still quite playable like that.
Re: NABU Computer Support
Here is the CLI Internet Adapter with homebrew for Windows, macOS x64, macOS ARM64, Linux 64, Linux ARM64, and Linux ARM 32: https://nabu.ca/nabu-internet-adapter-downloads
You will find many homebrew applications and Telnet, Chat, and NABULIB file functions, in the CLI Internet Adapter.
Also, while several people are creating disk images, the preservation group's effort is to restore and continue the development of the NABU Network. The NABU Personal Computer was designed to be "online" and store files on a server, not locally. Unlike other computers of the era that had local storage, the NABU was designed for remote storage. This is why their NABU floppy storage medium is scarce, and people with real hardware cannot use disks. The NABU-LIB and Internet adapter supports remote file storage, which I think you'll enjoy integrating with your existing effort.
I'm poking around at booting CPM from offline storage as well. I have also almost completed RetrOS for the NABU, which allows browsing and loading homebrew applications over the network. This compliments
Here is the link to the NABULIB GitHub, which demonstrates the remote file capabilities as well: https://github.com/DJSures/NABU-LIB
You will find many homebrew applications and Telnet, Chat, and NABULIB file functions, in the CLI Internet Adapter.
Also, while several people are creating disk images, the preservation group's effort is to restore and continue the development of the NABU Network. The NABU Personal Computer was designed to be "online" and store files on a server, not locally. Unlike other computers of the era that had local storage, the NABU was designed for remote storage. This is why their NABU floppy storage medium is scarce, and people with real hardware cannot use disks. The NABU-LIB and Internet adapter supports remote file storage, which I think you'll enjoy integrating with your existing effort.
I'm poking around at booting CPM from offline storage as well. I have also almost completed RetrOS for the NABU, which allows browsing and loading homebrew applications over the network. This compliments
Here is the link to the NABULIB GitHub, which demonstrates the remote file capabilities as well: https://github.com/DJSures/NABU-LIB
Re: NABU Computer Support
Dom, is z80.h not available when compiling with +cpm target?
zcc +cpm -subtype=nabu -create-app -mz80 -startup 0 -O3 --opt-code-speed -lm main.c -o "CHAT.CPM"
I receive this error
../NABULIB/NABU-LIB.h: line 29: file 'z80.h' not found
included from main.c:12
zcc +cpm -subtype=nabu -create-app -mz80 -startup 0 -O3 --opt-code-speed -lm main.c -o "CHAT.CPM"
I receive this error
../NABULIB/NABU-LIB.h: line 29: file 'z80.h' not found
included from main.c:12
Re: NABU Computer Support
Robert, congrats - your Deep Space is the first game to have been compiled and included in the NABU Main Menu since 1984.
I used your source to build a pak file that can be loaded from the cycle. It was venturous because I should have started with a simple hello world. But I decided it would be challenging to get an entire application with complex stuff to get built for the main menu DOS.... and it worked.
You can try it under DJs Playground Cycle in the NABU Channels of the Internet Adapter.
See the attached image.
I used your source to build a pak file that can be loaded from the cycle. It was venturous because I should have started with a simple hello world. But I decided it would be challenging to get an entire application with complex stuff to get built for the main menu DOS.... and it worked.
You can try it under DJs Playground Cycle in the NABU Channels of the Internet Adapter.
See the attached image.
You do not have the required permissions to view the files attached to this post.
Re: NABU Computer Support
DJ, that's fantastic news, thanks! BTW, the spelling should be "Deepspace" without a blank, that's how the author of the original game had named it (he is German).
I will get my other three cross-platform programs running in Nabu CP/M mode soon.
@Dom: two things I have noticed:
1. When using the generic console in text mode 0 only, clg() *must* be called at least once, otherwiese the screen will be broken. I don't know if that's normal, at least I haven't seen that on other TMS9918 targets.
2. When exiting from Deepspace to CP/M, I switch back to mode 0, but from then on the characters are broken.
I will get my other three cross-platform programs running in Nabu CP/M mode soon.
@Dom: two things I have noticed:
1. When using the generic console in text mode 0 only, clg() *must* be called at least once, otherwiese the screen will be broken. I don't know if that's normal, at least I haven't seen that on other TMS9918 targets.
2. When exiting from Deepspace to CP/M, I switch back to mode 0, but from then on the characters are broken.
Re: NABU Computer Support
Awesome! Robert - i'll check that out right next. I haven't used the emulator with deepspace, but on real hardware, the ufo leaves a trail. I'll post a pic later.
Oh, and Dom, I credited you on the project timeline for Nabu z88dk target. Thanks again; it's coming along nicely. Here's the link with the timeline: https://nabu.ca/development
The only trouble I'm having is still being able to import z80.h and use _zpoke, and zpeek for my custom interrupt for the RX buffer in nabulib. The baud rate is so friggin fast on this nabu that an interrupt alone isn't enough - it needs a pretty big buffer. My telnet vt100 emulation, for example, requires at least a 512-byte buffer at 115,200 baud. We'd be fine if this were a 9600 or 19.2k baud system. But 115.2 is too much for that little z80
Robert, do you have any insight on getting z80.h imported? I'm building with +cpm -subtype=nabu
I'm doing a +cpm that I'm launching from the main menu as a CPM application. I haven't tried the +nabu yet.
Oh, and Dom, I credited you on the project timeline for Nabu z88dk target. Thanks again; it's coming along nicely. Here's the link with the timeline: https://nabu.ca/development
The only trouble I'm having is still being able to import z80.h and use _zpoke, and zpeek for my custom interrupt for the RX buffer in nabulib. The baud rate is so friggin fast on this nabu that an interrupt alone isn't enough - it needs a pretty big buffer. My telnet vt100 emulation, for example, requires at least a 512-byte buffer at 115,200 baud. We'd be fine if this were a 9600 or 19.2k baud system. But 115.2 is too much for that little z80
Robert, do you have any insight on getting z80.h imported? I'm building with +cpm -subtype=nabu
I'm doing a +cpm that I'm launching from the main menu as a CPM application. I haven't tried the +nabu yet.
Re: NABU Computer Support
Robert - one last thing. This document explains the joystick: https://cloud.nabu.ca/docs/Nabu_Compute ... ressed.pdf
The joystick is connected to the keyboard. So the keyboard raises an interrupt, and the value can be read. I also use my Show Scancode Viewer to see what it does. It's in the Internet Adapter under Utilities in the Nabu Channel list
The joystick is connected to the keyboard. So the keyboard raises an interrupt, and the value can be read. I also use my Show Scancode Viewer to see what it does. It's in the Internet Adapter under Utilities in the Nabu Channel list
Re: NABU Computer Support
I'm currently working on the HCCA side of things - just working through a bit of a brain blockage around buffers, multiple protocols and zero-copy semantics.DJ Sures wrote: ↑Thu Jan 05, 2023 8:38 pmThe only trouble I'm having is still being able to import z80.h and use _zpoke, and zpeek for my custom interrupt for the RX buffer in nabulib. The baud rate is so friggin fast on this nabu that an interrupt alone isn't enough - it needs a pretty big buffer. My telnet vt100 emulation, for example, requires at least a 512-byte buffer at 115,200 baud. We'd be fine if this were a 9600 or 19.2k baud system. But 115.2 is too much for that little z80
I think originally you were using +z80 which is a newlib target, the +cpm that you've switched to is a classic target and it seems that I've not allowed classic access to those functions.
I'm not sure how I managed to miss that key table in the docs. I'll add in decoding for the joystick as well.The joystick is connected to the keyboard. So the keyboard raises an interrupt, and the value can be read. I also use my Show Scancode Viewer to see what it does. It's in the Internet Adapter under Utilities in the Nabu Channel list
Lots for me to do it seems!
Re: NABU Computer Support
@DJ: Dom is the z88dk developer, while I'm just a z88dk "user" who is creating software with it.
I have now managed to connect to the network with MAME (I should have read the wiki page more carefully), great stuff! Deepspace is of course running perfectly there. We have had such a phenomenon with a few targets previously, obviously the MAME emulation isn't 100% accurate. Fixing this won't be easy for Dom without the hardware, the approach would be to repeatedly "try something and let someone test it on the real machine" until it finally works...
I have now managed to connect to the network with MAME (I should have read the wiki page more carefully), great stuff! Deepspace is of course running perfectly there. We have had such a phenomenon with a few targets previously, obviously the MAME emulation isn't 100% accurate. Fixing this won't be easy for Dom without the hardware, the approach would be to repeatedly "try something and let someone test it on the real machine" until it finally works...
Re: NABU Computer Support
Will that be something I can get access to in a nightly build?I think originally you were using +z80 which is a newlib target, the +cpm that you've switched to is a classic target and it seems that I've not allowed classic access to those functions.
Your effort is appreciated There may only be a few nabu's out there right now - but that's changing as the seller catches up with orders. There's about 2,500 available. And I'm talking to a guy in the UK who is fabbing clones. I should have one soon to show in my youtube channel.Lots for me to do it seems!
Robert - your game was a hit tonight at the first Nabu meeting here.
You do not have the required permissions to view the files attached to this post.
Re: NABU Computer Support
Robert, i updated deepspace title name. I also added H-TRON to the DJ's Playground Cycle.
Can't wait to get z80.h going so I can add some other stuff I've been working on to the main menu
Can't wait to get z80.h going so I can add some other stuff I've been working on to the main menu
Re: NABU Computer Support
Hmm, I don't see it yet in the DJ Playground, despite having cleared the PAK cache in the NABU internet adapter.
Now Mastermind RK has a NABU CP/M disk image as well. However, controls are very sluggish. I had expected a board game like this to be less demanding, probably the blinking cursor is the problem. Maybe it runs better on the real hardware.
@Dom: screensize() returns 32x25 instead of 32x24, I have added a workaround for that in my game.
Re: NABU Computer Support
The Nabu main menu and mame controls aren't obvious. Each menu has additional pages that are easier navigated with the Nabu keyboard. To view other pages, you must press the PAGE UP or PAGE DOWN on the keyboard.
1) ANOTHER DJ PILE
2) DJ PILE 1
3) PAGE DOWN
4) H-TRON
1) ANOTHER DJ PILE
2) DJ PILE 1
3) PAGE DOWN
4) H-TRON
You do not have the required permissions to view the files attached to this post.
Re: NABU Computer Support
Dom - I know you got a lot of work on your plate, and I don't want to hinder your process. Can you clarify a few things based on your Nabu target outcome so I can align my development?
First - this is what I'm working on
- the NABU does not have bios in ROM. It downloads the "bios" with the main menu. The main menu also is a modified CPM. I'm changing the bios to read/write to the internet adapter. That way, the file system is on the remote PC, not on any local storage. Once I get it working on the remote PC, I'm moving it to a cloud server with an ESP32, so no local IA is required.
Things are holding me back with zcc +cpm -subtype=nabu from using Nabu-lib, which used to use +z80. Can you expand on the direction you're taking to support these so I can plan my approach?
1) z80.h
- i just included #include "c:/z88dk/include/_DEVELOPMENT/sdcc/z80.h". although it would be nice if it were included in the lib path. I only need delay(), peek() and poke(). Although I can get by those by making my delay and accessing memory directly by pointers - I need to know what to expect from the target moving forward if I should be duplicating your effort.
2) im2.h
- (Implicit definition of function 'im2_init' it will return an int. error: undefined symbol: _im2_init). The CPM Nabu target does not let me create interrupts. Will your +cpm -subtype=nabu be providing a circular HCCA RX buffer? If so, it can't use the current extern CALL for pushing and popping the registers because the extra instructions are too slow for the receive speed. That's why nabu-lib pushes and pops the registers manually with inline assembly in the isr().
3) inline
- with +cpm -subtype=nabu, I cannot define any functions inline. Am I missing a compilation parameter, or is that not available for CPM targets, and I should expect compiler optimization only?
Based on your direction - that'll help me understand what I should focus my effort on, not duplicate what you're doing. And to know what NABU-LIB should and shouldn't be doing based on what z88dk libraries already do to compile CPM NABU targets.
First - this is what I'm working on
- the NABU does not have bios in ROM. It downloads the "bios" with the main menu. The main menu also is a modified CPM. I'm changing the bios to read/write to the internet adapter. That way, the file system is on the remote PC, not on any local storage. Once I get it working on the remote PC, I'm moving it to a cloud server with an ESP32, so no local IA is required.
Things are holding me back with zcc +cpm -subtype=nabu from using Nabu-lib, which used to use +z80. Can you expand on the direction you're taking to support these so I can plan my approach?
1) z80.h
- i just included #include "c:/z88dk/include/_DEVELOPMENT/sdcc/z80.h". although it would be nice if it were included in the lib path. I only need delay(), peek() and poke(). Although I can get by those by making my delay and accessing memory directly by pointers - I need to know what to expect from the target moving forward if I should be duplicating your effort.
2) im2.h
- (Implicit definition of function 'im2_init' it will return an int. error: undefined symbol: _im2_init). The CPM Nabu target does not let me create interrupts. Will your +cpm -subtype=nabu be providing a circular HCCA RX buffer? If so, it can't use the current extern CALL for pushing and popping the registers because the extra instructions are too slow for the receive speed. That's why nabu-lib pushes and pops the registers manually with inline assembly in the isr().
3) inline
- with +cpm -subtype=nabu, I cannot define any functions inline. Am I missing a compilation parameter, or is that not available for CPM targets, and I should expect compiler optimization only?
Based on your direction - that'll help me understand what I should focus my effort on, not duplicate what you're doing. And to know what NABU-LIB should and shouldn't be doing based on what z88dk libraries already do to compile CPM NABU targets.
Re: NABU Computer Support
Well, looks like I've got the love for z88dk back....
This evening I've done the following:
- Imported the contents of newlib z80.h into classic arch/z80.h
- Fixed the number of rows for +cpm -subtype=nabu
- Added support for the hardware joysticks + the special keys can now be picked up
Hopefully that should unblock a few things.
@RobertK:
@DJ:
I'm half way through writing the hcca interrupt code - I want to provide both a ringbuffer for general usage and a zero-copy for loading chunks directly to the right address rather than going via a buffer.
Hopefully I'll get round to it this weekend, however to unblock you until I've done it, try something like this:
That should register the functions to handle interrupts for the HCCA without interfering with the keyboard and VDP interrupts.
Hopefully I've not missed anything out.
This evening I've done the following:
- Imported the contents of newlib z80.h into classic arch/z80.h
- Fixed the number of rows for +cpm -subtype=nabu
- Added support for the hardware joysticks + the special keys can now be picked up
Hopefully that should unblock a few things.
@RobertK:
That's odd - changing the screen mode should do a clg() in anycase. I'll see if I can reproduce it.1. When using the generic console in text mode 0 only, clg() *must* be called at least once, otherwiese the screen will be broken. I don't know if that's normal, at least I haven't seen that on other TMS9918 targets.
I suspect this is the same problem as we had on the Einstein where we use different addresses for the character set so it's "broken" on exit?2. When exiting from Deepspace to CP/M, I switch back to mode 0, but from then on the characters are broken.
@DJ:
This has been added under arch/z80.h1) z80.h
Good! The port handles the interrupts (see: https://github.com/z88dk/z88dk/blob/mas ... t_init.asm) so there's no need to set the table.2) im2.h
- (Implicit definition of function 'im2_init' it will return an int. error: undefined symbol: _im2_init)
I'm half way through writing the hcca interrupt code - I want to provide both a ringbuffer for general usage and a zero-copy for loading chunks directly to the right address rather than going via a buffer.
Hopefully I'll get round to it this weekend, however to unblock you until I've done it, try something like this:
Code: Select all
void setup_interrupts() __naked
{
__asm
di
ld a,i
ld h,a
ld l,0
ld de, _hcca_rx_isr
ld (hl),e
inc l
ld (hl),d
inc l
ld de, _hcca_tx_isr
ld (hl),e
inc l
ld (hl),d
ei
ret
__endasm;
}
So, there's two compilers as well as two libraries. Only sdcc supports inline, so add -compiler=sdcc to your compile command line.3) inline
Hopefully I've not missed anything out.
Re: NABU Computer Support
Dom - you're a rockstar - those changes will hold me over to continue with the stuff I'm doing for the cloud CPM build. Thanks so much!
Re: NABU Computer Support
Does z88dk have any means of reserving/blocking a memory address range?
I am making a loader that writes the BIOS between 0xd800 to 0xFB28. But the loader is throwing stuff up there
I am making a loader that writes the BIOS between 0xd800 to 0xFB28. But the loader is throwing stuff up there
Re: NABU Computer Support
Sorry, I can't edit my previous message, but I figured out what I needed to do. I was way off base on the question.
Re: NABU Computer Support
I've not forgotten this, I've just been a bit too tired in the evenings!
However, here's a screenshot of some WiP - just debugging a problem with writing to files:
However, here's a screenshot of some WiP - just debugging a problem with writing to files:
You do not have the required permissions to view the files attached to this post.
Re: NABU Computer Support
HCCA and Retronet support has now been merged. I'm sure I'll do a bit of cleanup on it, but at least it's there and functional.
Any other hardware that should be supported?
Any other hardware that should be supported?
Re: NABU Computer Support
sorry i've been preoccupied with cloud cp/m. I have looked a bit into z88dk examples that will compile for nabu. I'm using the msx examples that do not require msx bios, but i do run into issues where they usually crash. Or, there are issues with newlines in input, etc..
The z88dk examples would be useful for joystick, graphics, sound and such. Would you be able to create a makefile to build the nabu-compatible cpm demos? Such as the msx and other targets have?
The z88dk examples would be useful for joystick, graphics, sound and such. Would you be able to create a makefile to build the nabu-compatible cpm demos? Such as the msx and other targets have?
Re: NABU Computer Support
Here is the Dstar sample game for NABU CP/M. I've noticed that the current NABU network version crashes at the start.
I have added screen mode switching in the dstar.c file, I'm using mode 2 for gameplay, and with that it's working.
Use QAOP and Space.
I have added screen mode switching in the dstar.c file, I'm using mode 2 for gameplay, and with that it's working.
Use QAOP and Space.
You do not have the required permissions to view the files attached to this post.
Re: NABU Computer Support
okay - switching screen modes should be fine because the cloud cpm bios is only active when cpm is requesting something, such as CONIN or CONOUT, etc..
The latest bios (which I haven't uploaded yet) restores the font and text mode . so that will help on exit of a graphic game that destroys the vdp ram.
also, the latest bios (Which I have to create another post for) has virtual 80 column mode that can be moved with the page up and down keys. But it doesn't work with kbhit or getchar because I think the nabu cpm build isn't using bdos commands.
The latest bios (which I haven't uploaded yet) restores the font and text mode . so that will help on exit of a graphic game that destroys the vdp ram.
also, the latest bios (Which I have to create another post for) has virtual 80 column mode that can be moved with the page up and down keys. But it doesn't work with kbhit or getchar because I think the nabu cpm build isn't using bdos commands.