News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Tryout Operating systems

Started by PortoManc, 17:43, 29 September 23

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

PortoManc

I hope this is the correct place to post this thread... If not, please move it to the correct one, please.
I'm beginning to delve a little into Machine code on my recently installed CPC6128 emulators on my Windows 11 PC. I've been digging around and found a stack of PDF books on programming in BASIC, Machine Code, C, etc.
This may be a bit of a silly question, but I'd like to know if it's possible to build my own boot disk for a new Operating System (let's call it 'PJRDOS'). I know we already have AmsDOS and CP/M in various flavours, so most will probably think it's a bit of a pointless exercise, but I'm curious to see if it can be done. I know it's possible on other processor types (eg Intel 8080) to write code to a boot sector on a floppy disk and build up a DOS from there, but those are for PCs. There are a number of disk editors for the Amstrad CPC6128, where we can perhaps write to the boot sector of the disk, and then daisychain into the internals of the OS processes. Has anyone done this before (or even attempted to build an Operating System from scratch for their machine)? And what success did they get?
I know that an Amstrad doesn't simply just 'boot up' by checking the contents of Disk A: as would a PC, by the way, so I would envisage a disk perhaps that would load an RSX (again, let's say something like '|PJR'), and then that would look for the 'system disk' in drive A and continue on...
Feasible? 
Thanks 

eto

when you enter |CPM in BASIC it loads and executes the boot sector.

PortoManc

Yes, eto, thank you for your reply. I'm aware that |CPM boots up a CP/M disk from a call to memory. But I wondered if that RSX call specifies a particular set of bootstrap instructions (specific track & sector for the disk, unique for a CP/M system disk) which might not be applicable to a non-CP/M disk. So, on the off-chance that that was the case, I suggested a |PJR RSX that would do the same for the PJR-DOS disk.

Nich

Quote from: PortoManc on 19:22, 29 September 23But I wondered if that RSX call specifies a particular set of bootstrap instructions (specific track & sector for the disk, unique for a CP/M system disk) which might not be applicable to a non-CP/M disk.
|CPM looks for track 0, sector &41 on the disc in drive A, loads it to address &100 in RAM, and executes it. The standard CP/M format on the CPC uses sectors numbered from &41 to &49 inclusive, but as long as track 0, sector &41 is present, CP/M will load and execute the code/data in that sector.

PortoManc

Nich,
That's useful. I was able to create a 'virtual' drive and amend that sector (it only created a blank screen, however, as I edited that sector and added code for a 8086-processor boot sector - yes... I know that is wrong for a Z80 processor, but once I can begin to disassemble the CP/M bootloader and see what I can do with it, then we shall see how successful it might be as a project  :) )
 

GUNHED

Instead of going to use the !CPM command to boot from disc there are other ways to get an OS started. (But before I go into this: You can disconnect a wire bridge on the CPCs PCB, then it gets as dump as a 8086 machine and directly starts to boot from disc btw).

For example FutureOS does boot from ROM (well, it actually runs into ROM to save RAM and make it more stable). This is done by RSX command !OS.
But you can also move the ROM A of FutureOS it ROM position 0 - then it get's started as soon as you switch your CPC on.
And you can also use a patched Lower ROM to directly start up FutureOS.

Well, just to show that there are different ways to get startet.  :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2024.10.27)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

BSC

Quote from: GUNHED on 13:44, 03 October 23Instead of going to use the !CPM command to boot from disc there are other ways to get an OS started. (But before I go into this: You can disconnect a wire bridge on the CPCs PCB, then it gets as dump as a 8086 machine and directly starts to boot from disc btw).

For example FutureOS does boot from ROM (well, it actually runs into ROM to save RAM and make it more stable). This is done by RSX command !OS.
But you can also move the ROM A of FutureOS it ROM position 0 - then it get's started as soon as you switch your CPC on.
And you can also use a patched Lower ROM to directly start up FutureOS.

Well, just to show that there are different ways to get startet.  :)
Or just to create another opportunity to mention your "OS"? 
** My website ** Some music

My hardware: ** Schneider CPC 464 with colour screen, 64k extension, 3" and 5,25 drives and more ** Amstrad CPC 6128 with M4 board, GreaseWeazle.

PortoManc

Thanks, Gunhed. Actually, because this Amstrad is a 'virtual machine' on my Windows PC, I can't really delve around on the innards of the box. The ROM idea might be useful too, but again, I'd have to write and 'flash' a 'virtual ROM', that I could 'load' into my virtual machine emulator. But your replies ahve given me (and I hope others) some ideas to think about.
 

GUNHED

Quote from: BSC on 19:11, 03 October 23
Quote from: GUNHED on 13:44, 03 October 23Instead of going to use the !CPM command to boot from disc there are other ways to get an OS started. (But before I go into this: You can disconnect a wire bridge on the CPCs PCB, then it gets as dump as a 8086 machine and directly starts to boot from disc btw).

For example FutureOS does boot from ROM (well, it actually runs into ROM to save RAM and make it more stable). This is done by RSX command !OS.
But you can also move the ROM A of FutureOS it ROM position 0 - then it get's started as soon as you switch your CPC on.
And you can also use a patched Lower ROM to directly start up FutureOS.

Well, just to show that there are different ways to get startet.  :)
Or just to create another opportunity to mention your "OS"?
Thank you for creating another opportunity for me. So read it... FutureOS rocks! And it loves you! Yes, you too!  :) :) :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2024.10.27)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

GUNHED

Quote from: PortoManc on 19:17, 03 October 23Thanks, Gunhed. Actually, because this Amstrad is a 'virtual machine' on my Windows PC, I can't really delve around on the innards of the box. The ROM idea might be useful too, but again, I'd have to write and 'flash' a 'virtual ROM', that I could 'load' into my virtual machine emulator. But your replies ahve given me (and I hope others) some ideas to think about.
 
Thanks. Most emulators (today) allow to comfortable manage ROMs. Somewhere in the Wiki it's described how to make an own ROM. So called RSX commands can be defined. 
After switching on the CPC you enter !YOURCOMMAND and this will call your routine / program inside the ROM, then come back to the Firmware of the CPC.  :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2024.10.27)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

andycadley

An easier way is to emulate a Plus machine and just build a cartridge file.

GUNHED

Indeed, after having a working ROM one can also create a complete Cartridge. In this case one can use up to 512 KB of ROM.
http://futureos.de --> Get the revolutionary FutureOS (Update: 2024.10.27)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Prodatron

Btw, I think the main challenge is creating the OS itself, not how to boot it :D

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Powered by SMFPacks Menu Editor Mod