Thread: PDOS for Amiga
View Single Post
Old 04 March 2021, 02:50   #27
kerravon
Registered User
 
Join Date: Mar 2021
Location: Ligao, Free World North
Posts: 228
Quote:
Originally Posted by phx View Post
Good job! It means you can compile this GCC version on any system with a working ANSI-C compiler!? That's real portability, and that's how it should have been done from the beginning. Congratulations!
Yes, exactly. I used to compile GCC 3.2.3 with different C compilers to use debugging facilities, but it's been a long time since I did that. The 68000 target will use some extra source that wasn't compiled with either the mainframe or 80836 targets, so there's a possibility something there doesn't work and will need a bit more work to be done. I normally only build GCC 3.2.3 with other versions of GCC, not other C compilers. I do cross-compilation as well.

Quote:
There is a small Boot ROM, which can do nothing else than loading 256K of a kickstart disk into the WOM (Write-Once Memory).
You can use it to load your OS instead, but afterwards you still have to do everything yourself.
Ok, based on all of this, I have a new proposal.

How about first step is write a 32-bit IBM PC-like BIOS to enable porting of IBM PC operating systems?

Here are the main BIOS functions I currently use:

C:\devel\pdos\src>grep Bos pdos.c
bootedAt = BosGetClockTickCount();
memavail = BosExtendedMemorySize();
rc = BosFixedDiskStatus(x);
BosReadKeyboardCharacter(&scan, &ascii);
BosReadKeyboardCharacter(&scan, &ascii);
retval = BosGetSystemDate(&c,&y,&m,&d);
BosSetSystemDate(year / 100,year % 100,month,day);
BosGetSystemTime(&ticks,&midnight);
BosReadKeyboardCharacter(&scan, &ascii);
rc = BosDiskSectorRead(readbuf, 1, drive, track, head, sect);
BosDiskReset(drive);
rc = BosDiskSectorRLBA(readbuf, 1, drive, sector, 0);
BosDiskReset(drive);
rc = BosDiskSectorWrite(writebuf, 1, drive, track, head, sect);
BosDiskReset(drive);
rc = BosDiskSectorWLBA(writebuf, 1, drive, sector, 0);
...


Here is a simple example:

/* BosWriteText - BIOS Int 10h Function 0Eh */ int BosWriteText(int page, int ch, int color) { union REGS regsin; regsin.h.ah = 0x0e; regsin.h.al = ch; regsin.h.bh = page; regsin.h.bl = color; int86i(0x10 + BIOS_INT_OFFSET, &regsin); return (0);
}


So Kickstart would be replaced by this BIOS. ie the BIOS would be loaded by the Amiga 1000, and install some interrupt vectors, not necessarily interrupt 0x10, and then wait for the OS disk to be inserted. The OS could be PDOS or Linux or FreeBSD, whatever. (Assuming they used the non-existent 32-bit BIOS, which they probably don't, but PDOS/386 basically does).

Actually I would be happy if BosWrite() even did graphics conversion instead of writing to the serial port. So long as it is in the BIOS code, not the OS code. If the hardware hasn't provided text capabilities, then the BIOS should be the thing that compensates for the hardware, it shouldn't be left to the OS to do. That's my current thinking, anyway. That's what "feels right" to me. The BIOS should be providing this hardware separation layer.

Having proposed this, ie a deviation from Commodore Kickstart, does this buy me anything:

https://en.wikipedia.org/wiki/AROS_R...erating_System

A workable AmigaOS Kickstart clone for the Motorola 68000 processor was released on March 31, 2011 as part of a programming bounty.


Perhaps this alternate kickstart can be hacked into an actual BIOS? It may even contain character to graphics conversion capability already?
kerravon is offline  
 
Page generated in 0.06894 seconds with 11 queries