News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_pollito

SymbOS on NC200?

Started by pollito, 10:31, 17 June 23

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pollito

@Prodatron a long time ago in this thread you mentioned a possible port of SymbOS to the NC200.

Did you make any progress with it? Is it still on the radar?

Cheers,
Nick

Prodatron

Hi Nick, yes, it is on the radar, but somehow I was always waiting for an NC xxx emulator with integrated debugger.
As there is no, I should finally start the port anyway. Just have to find out how to use one of the existing emulators for Windows (I am currently trying to start NC100EM).

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

pollito

Quote from: Prodatron on 13:18, 17 June 23Hi Nick, yes, it is on the radar, but somehow I was always waiting for an NC xxx emulator with integrated debugger.
As there is no, I should finally start the port anyway. Just have to find out how to use one of the existing emulators for Windows (I am currently trying to start NC100EM).
That's great news. I had a look for NC200 emulators and found this thread which talks about Emulator Kit, and also mentions that MAME can emulate an NC200. I haven't tried either of these yet but will have some time today or tomorrow to see which ones I can persuade to work on Windows.

Prodatron

#3
I got an older emulator version (Nilquader fork) running in Windows, and now try to start with the SymbOS port. I am very glad that Russell was back in action some time ago with releasing 1.3 of NC100EM. I guess I need some help sometimes.
As the screen manager (low level screen routines) has already ported to the NC in 2016 it shouldn't be too much work to port the remaining parts of SymbOS to the NC.

There are still some questions and thoughts:

- what would be the best way to boot SymbOS on a NC200? And on a NC100? Currently I am building the binary as a rom file, which will be used in the emulator but of course can't be used with the real machine.

- an NCxxx can be expanded with PCMCIA SRAM (up to 1MB). Is this as fast as the internal ram? If not, I am thinking about using the internal for the first 64K and the external for everything behind (similiar to the Enterprise 64/128, where you have slow and fast ram, but inverted :D ).

- the Y resolution is very limited, so you will have a larger virtual screen in SymbOS, where only a part will be displayed (escpecially on the NC1x0).
Currently I am thinking about providing three screen modes:
480x128 (??), 480x192, 480x255. I am afraid, that 480x128 makes no sense, as many apps and dialogues will be cropped too much.
I will provide a keyboard shortcut for flipping the screen in a fast way (unfortunately NC only allows to "scroll" in 64pixel Y-steps). So on a NC200 with a selected resolution of 480x192 you will see 2/3 of the total screen and can switch between the upper 2/3 and lower 2/3 just with one click.
The NC100 will only see 1/3 at once, but maybe that's still better than nothing... Let's see, how this will work in practice.

- floppy disc support would be cool on the NC200, as SymbOS supports FAT12 anyway. Currently I wonder if NC200 with connected PSU have enough power for this, and if my current emulator is supporting it. But that's something for later.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

robcfg

This is great news!

Regarding your questions:
Quote- what would be the best way to boot SymbOS on a NC200? And on a NC100?
On an NC100, I'd say having it on rom is almost mandatory. On a NC200 rom would be equally nice, but being able to boot from floppy would be excellent!

Quote- an NCxxx can be expanded with PCMCIA SRAM (up to 1MB). Is this as fast as the internal ram?
I honestly don't know. What I know is that type I PCMCIA cards are hard as hell to find and the ones I've seen are battery backed, so not ideal either.

That said, it seems that a type II card can be used up to 1MB thanks to this little piece you can 3D-print from ThingiVerse.

The NC150s also have double the ram if I remember correctly, and the NC100s can be probably easily upgraded.

Quote- floppy disc support would be cool on the NC200, as SymbOS supports FAT12 anyway.
Yes, please! I think the disk drive on the NC200 is a life saver. I'd have doubts that it would work running on batteries, but it should be the expected behaviour running on a PSU.

:D

Prodatron

@robcfg, thanks for your response!
Quote from: robcfg on 23:19, 19 June 23What I know is that type I PCMCIA cards are hard as hell to find and the ones I've seen are battery backed, so not ideal either.

That said, it seems that a type II card can be used up to 1MB thanks to this little piece you can 3D-print from ThingiVerse

Ops, I didn't remember that there are type I and II cards. Battery backed isn't good?
So what would be the best PCMCIA SRAM card for the NC?

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

pelrun

It doesn't matter that the SRAM card is battery backed since the NC's internal ram is too. And they are just as fast as the internal ram.

The best card is the one you can get your hands on without spending a ridiculous amount. https://www.best-electronics-ca.com/portfoli.htm is running extremely low on stock now, so you'll want to hurry.

zgedneil

A ROM boot may be doable on the real thing, I think they have a socketed ROM chip accessible without opening the case. Still, the simplest option has to be booting from memory card. You can do this with Function-X, if you have the right data at the start of the card.

The problem then is getting that card written. You can transfer a binary over serial with XMODEM (including a trailing ^Z to stop the ROM OS messing with it in some cases), and use the "Make program card" option - but as I learned recently, non-UK NC100s don't seem to include that option (yet NC150s do). So you might have to resort to *LOAD and CALL in BBC Basic, like ZCN generally does for an initial boot.

Prodatron

Thanks for the hints!
First step is to get it working on an emulated NC200 at all.
"Booting" from an own ROM works fine now, and I am currently testing the low level screen routines.
Unfortunately I won't have any time during the next 2 weeks, but I hope to be able to continue in July.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

robcfg

I mention the battery-backed sram cards because of potential problems of corrosion if they are sold with an old battery on them.

If you need someone to do some beta testing, just drop me a line!  ;D

pollito

I had a play around with NC200 emulator in MAME, and managed to get Emulator Kit to compile in cygwin, but haven't got around to working out how to use it yet. Unfortunately I couldn't get it nc100em to compile under cygwin. I will try on MSYS2 when I have time.

Regarding booting SymbOS, it would be nice to have some options. Maybe it could also be loaded from floppy or a floppy emulator? I like the thought of being able to boot up any OS I feel like without having to physically swap ROMs.

pollito

Quote from: robcfg on 12:48, 20 June 23I mention the battery-backed sram cards because of potential problems of corrosion if they are sold with an old battery on them.
I've got 2 battery backed 1MB cards in the US waiting for my colleague's next visit to the UK (I probably won't see them until Christmas). I really hope there are no old batteries in them!

I heard that PCMCIA II flash cards work with the guide replacement you linked to, but that the built in OS doesn't recognise them. Do they also work as RAM for other OSes, or just storage?

I need to track down a (2mm I believe) rubber band to fix the drive in my NC200. It's surprisingly hard to find specific widths on the internet!

Prodatron

I couldn't resist...

You cannot view this attachment.

As you can see at the clock "SymbOS NC" is already alive :D

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Prodatron


I have to fix some issues with the keyboard mapping and then next thing will be some kind of mass storage support. But somehow it's working nice already.
You cannot view this attachment.
I wonder how to detect, if it's a NC100, NC150 or NC200. I should try to detect the ram (64K or 128K internal), but then there is still the question, if it's a 100 or 150. So I should probably have a look at the rom as well.

And then there is the RTC:
- I couldn't find any information about the RTC in the NC100 >:(
- the NC200 has a different RTC with available docs, but I still have to find out how to use the NC ports for reading (and setting?) it

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

pelrun

Quote from: Prodatron on 00:32, 21 June 23- I couldn't find any information about the RTC in the NC100 >:(

It's a TC8521, the datasheet is on the wiki (https://www.cpcwiki.eu/index.php/NC_Series) and it's memory-mapped to &D0-&D9 as per NCIOSPEC.TXT (https://www.cpcwiki.eu/index.php/NC100_IO_Specification)

 8)

zgedneil

The NC200's RTC seems to act like an MC146818, while the NC150 uses the same RTC as the NC100. ZCN's src/zcnfunc.z covers RTC read and write for all NCs, if that helps.

As for detecting NC model, ZCN has an "nctest" command which might be of interest (it can also be run on the ROM OS). The tests that uses are RAM size, ROM page the BBC Basic is in, and RTC type (a bit tricky to test). It also does floating bus and NC200 RTC "UIP" checks, but those are just to try and spot emulators.

Prodatron

Thanks, that was very helpful!

Is it possible, that the NC200 has a different keyboard matrix compared to the NC100?

The matrix, which is listed here...
https://www.cpcwiki.eu/index.php/NC_100/150/200_IO_Specification
seems to have at least some of the numbers (4,5,6,7,8,9,0) at different positions, when I am testing it in NC200 mode.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

zgedneil

Yes, it differs slightly on the NC200. If you check nc100em 1.3a's sdlmain.c, key_event() there should make things pretty clear, as it covers both the NC200 and non-NC200 cases.

I think another difference is that reading port B9h implicitly clears a keyboard (100Hz) interrupt on the NC100/NC150, while on the NC200 you have to write to port 90h as you would for other interrupts. On a real NC100 you can actually do the port 90h write as well, but I think that causes problems on some emulators.

Prodatron

Thanks Russell! I already modified the keyboard matrix for the NC200, it's working now.
I am already writing 0 to #90 in all cases. If this won't run on an emulator as it is expecting the b9-nc100 behaviour I will know the reason.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Prodatron

#19
I added a provisional ROM disc driver to test, if apps are running, and everything seems to work fine so far:

You cannot view this attachment.

You cannot view this attachment.

You cannot view this attachment.

Here is the ROM file for the NC100EM emulator, if you want to play around with it a little bit:
You cannot view this attachment.

Currently it's supporting the NC200 and its 128K internal ram.

Use the yellow function key (this is "insert" on my windows keyboard) to flip the screen up and down. Press Alt+arrow key to move the mouse and Alt+space to click (Alt is the symbol key on the NC200).

On drive A (which is the "rom disc" drive) you will find some files which can be executed.

No idea, if it would run on a real machine. Next steps are supporting memory expansion, supporting the NC100 as well (keyboard, RTC, smaller screen), booting from SRAM card, add control panel/FDC/ram disc for sram card support etc etc, but this has to wait until mid of july.

So the SymbOS NC100/150/200 port (now the 4th platform) is going to become reality, but this port is maybe not so useful, because of the small screen. It's currently using virtual 480x192, which is fine, but you have to flip up and down to see everything. On the NC100 this will be even worse. I will try a resolution of 480x128 as well as virtual 480x256 later.

PS: I wonder, if it would be possible to attach a serial mouse to the NC?

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

robcfg

Awesome!

Regarding the apps, I think that if you could add a horizontal layout you wouldn't need to swipe the screen back and forth that much.


Prodatron

Ok, but it will require a redesign of a several forms. I will give it a try. At the end you will be able to choose between 480x128, 480x192 and 480x256. 480x64 doesn't make any sense, so an NC100 always have to scroll.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Prodatron

SymbOS NC now supports external PCMCIA SRAM cards as well for using up to 1MB of ram.

You cannot view this attachment. 

The control panel has been adjusted as well (for supporting the new keyboard and screen), and now you can choose between resolutions of 480x128, 480x192 (virtual), 480x256 (virtual). It was quite interesting, that even 480x128 is working quite ok with several apps.

All apps are working fine including Doom
You cannot view this attachment. 
and even Lymmings (not released yet). 
You cannot view this attachment. 

Now I have to figure out how to boot SymbOS not from ROM but from SRAM (PCMCIA) or floppy disc.
I still wonder if it could support a serial mouse.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

robcfg

This is brilliant!  8)

Prodatron

#24
The NC100/200 port is "more" or "less" completed:

"more":
- beside the SymbOS core part all system apps have been extended with platform specific stuff
- SymShell supports a full screen mode on the NC200 with 80x25 chars as well; this requires a font of only 6x5 pixels, which is quite a challenge; see below - are you able to read something? :) ; I guess the font still can be improved; it's interesting that a 4x6 pixel font seems to be easier to do/read than the bigger 6x5, but the y-size of only 5 pixel is necessary for 25 lines on a y128-pixel display.
- anyway textoutput in SymShell 80x25 fullscreen mode is very fast on the NC as the font is stored in 5 different versions, no byte shifting is necessary

Help:
You cannot view this attachment.
Dir:
You cannot view this attachment.
Man:
You cannot view this attachment.
Unzip:
You cannot view this attachment.

6x5 Font:
You cannot view this attachment.

- Starfield screensaver runs fine as well :)
- FDC driver has been added (no idea if it works, as my windows versions doesn't seem to support it?)

"less":
- we still need a boot loader for a real system which is using an SRAM card with a preinstalled installation
- booting on a naked NC200 system with 128K from floppy without SRAM card as well
- adding RAM disc for SRAM cards: e.g. 1MB PCMCIA cards would be divided into 512K ram for executing applications and 512K ram disc for storing data
- nothing has been tested on real hardware, as my NC200 is currently dead unfortunately

Beside all this I am now motivated to do a serial mouse driver as well. If running only at 1200bauds you only have 3ints/"frame" which is little for the Z80 and more than enough for reading a mouse.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Powered by SMFPacks Menu Editor Mod