Apout
Apout copied to clipboard
VAX version?
Hi, and firstly thankyou for this great tool which very much eases cross compilation of ancient Unices.
I was wondering if there exists a VAX version or any plan to create one? As I want to try building 4.3BSD and it is a pain to have to do everything inside simh. The apout model where you have access to your native filesystem is easier.
From what I understand the system calls for 4.3BSD should be very close to 2.11BSD except with ints and pointers upgraded to 32 bits. So if I worked on any missing parts of the 2.11BSD simulation and then dropped in a VAX CPU emulator it should more or less work right? Or is there a better way that I haven't thought of?
I recall that when I was into FUZIX I created a test version of Apout with a Z80 or 6502 CPU which I probably never completed, any interest in that?
cheers, Nick
Hi Nick, good to hear from you. I think there are two issues here. Firstly, is there a VAX simulator you could use to do this? Given it's a CISC CPU with a 32-bit address space, it's going to be way more complicated to write one than for the PDP-11. Secondly, I'm pretty ashamed of my system call interface in Apout. I wrote it probably 20 or more years ago, and I would definitely spend some time refactoring it. For the PDP-11 version, I had to truncate integers down to 16 bits, which you wouldn't have to do for a VAX version. So, yes its doable, but I would start with an existing VAX simulator, remove anything to do with page tables, user/kernel mode, and then use the syscall code in Apout as a guide to rewrite it :-) Finally, it's interesting that you mentioned FUZIX. I'm currently designing a 6809 SBC with user/kernel mode and an MMU, and looking at porting or writing a Unix-like OS for it.
hi Warren, Yes, I agree with your thoughts. When I last worked on it (and I found the repo with those 6502 / Z80 mods last night) things were indeed a bit crusty, although of course the main consideration is whether it works, and it does, brilliantly :)
Interestingly I was just recently learming 6809 and have been doing an emulator for it, my emulator is focused on binary analysis so its slower but perfectly acceptable. I used as a reference a great document that lists all 6809 / 6309 documented and undocumented behaviours and the VCCE (I think) emulator on github. I am on mobile now, can provide links later on.
We can certainly collaborate on doing an 8 bit OS. Lately I have been collaborating a bit with asxxxx author Alan R. Baldwin with a goal (my goal at least) to create a more standardized toolchain based on asxxxx for compiling ancient Unices. I do not have a good solution to compiler porting issues (yet) but as a first step we created a beta PDP11 assembler in his framework and I am trying to compile V7 with it. I'll update.