Who has RISCiX sources?
Sarah Walker (8227) 14 posts |
@Paolo – fine with me. |
Paolo Fabio Zaino (28) 1882 posts |
@ Sarah
Thanks a lot! |
Theo Markettos (89) 919 posts |
From the hardware side, here’s an old post of mine and a circuit diagram explaining how it works. To repost the text: The chip is a PAL. Here is what I can dredge up from my memory about it: Essentially the circuit multiplexes the slave MEMC. Physical memory lives at 0x2000000 to 0x3000000. So the first (master) MEMC occupies physical memory from 0x2000000 to 0x2400000 and the first slave from 0x2400000 to 0x2800000. When the circuit tries to access memory between 0x2800000 and 0x2C00000, it uses A22 to the second slave as an enable line - when high, the second slave thinks it is the first slave and is activated. When low, the 2nd slave thinks the master MEMC is being accessed and is not active. So the logic for A22w/x/y/z is something like: physmem = (A25 & !A24) A22w (master MEMC) = !(physmem & !A22 & !A23) (active low) A22x (1st slave) = (physmem & A22 & !A23) (active high) A22y (2nd slave) = (physmem & !A22 & A23) (a.h) A22z (3rd slave) = (physmem & A22 & A23) (a.h) A7 is for the logical-physical address translators. When accessing them, A7 denotes whether to write into the master or slave MEMC table. My memory is bad on this, but what I _think_ happens is that bit 12 of the translator (supplied in A12) is used to extend the physical page number in A0-A7 and so multiplex onto A7: l2p = (A25 & A24 & A23) A7w = !(l2p & !A7 & !A12) A7x = (l2p & A7 & !A12) A7y = (l2p & !A7 & A12) A7z = (l2p & A7 & A12) I _think_ that's all there is in the PAL. I'm not sure whether the nR/W line affects things though. |
Theo Markettos (89) 919 posts |
By the way, surely RISC iX on a 512KiB machine with 8KiB pages is a red herring? I don’t recall it being shipped on a machine with less than 4MiB RAM, so why would you develop on a machine with so much less? All the RISC iX hardware has 4MiB or more, so doesn’t that mean a fixed 32KiB page size? I doubt there is much to be gained by trying to match RISC iX against a recompiled 4.3BSD – I imagine there’s a lot that’s peculiar to RISC iX – not least the ARM CPU, the memory model and the I/O subsystem. There might be some mileage in an ‘annotated disassembly’ or an asm-to-C conversion, maybe matching features/strings with the 4.3BSD sources. As an illustration, look at the kernel for Helios (designed as an OS for the Transputer but with ports to hardware including the Archimedes, roughly contemporary with RISC iX). Helios isn’t Unix, but it appears there’s roughly equal amounts of ARM and system-independent code. |
Paolo Fabio Zaino (28) 1882 posts |
@ Theo
So, not sure where the “develop on a 512KB” system come from, but to be clear my curiosity (probably out of topic here lol) where triggered after Stuart mentioned that the A305 had 512KB and 8K pages, so got curious about it before the weekend which is the only time I have I can play with RISC OS. RISCiX is 32KB page only and correct works from a minimum of 4MB, but it works way better with 8MB or 16MB. It’s 26bit only hence correct big differences with the original 4.3BSD and not sure either why it was mentioned to compare the two binaries or something, but I thought I just did not understand what was meant. However totally agree there is nothing to gain by any comparison. If, for a spare time project, we want to “re-generate” the RISCiX source in an Open Source fashion it has to be done on 4.3BSD or even better latest NetBSD (we could start from NetBSD 7.2 which is the last ever release of NetBSD supporting Arcon26) or we could start from NetBSD 8.1 just for Acorn32. But it would be fun to run RISCiX in a window using ArchiEmu like we can already do with RISC OS 2, RISC OS 3 and ARMLinux :) and it’s super cool to see in a video running them all together plus a demo on RISC OS 2 or 3 on a mini.m :) It would be even cooler if the ArchiEmu slowly would start to use ARMv7/v8 Hypervisor as well, so to have both Emulation and Virtualisation, but I don’t think the ArchiEmu source is available as Open Source, too bad. :( |
Alan Williams (2601) 88 posts |
There’s quite a lot of RISC iX resources on this page along with a downloadable disk image that might be a place to start tying to run it in an emulator. (I haven’t tried this as I still have a working real one) https://www.riscosopen.org/forum/forums/5/topics/15668?page=3 The only non Acorn driver I remember was one for a scanner of some sort. A lot of people would have liked a driver for Ether3 as it has UTP but it didn’t happen. I think that was from Atomwide. |
Ben Jameson (2432) 2 posts |
I had RISCiX 1.21c working with an Atomwide Ether3 card in an R140 (which also had an Aleph-1 ARM3 and an Atomwide 8Mb upgrade making it a lot more useful). I did have to swap the original AUN ROM out in order for it to be recognised by RISCiX though and I’m not sure whether I had a stock kernel on that machine. Looks like there’s a discussion on Stardot about this: https://stardot.org.uk/forums/viewtopic.php?t=14277The machine in question also had an Econet card and provided IP routing between Econet and Ethernet, although as I recall this wasn’t as useful as all that as there were two standards for IP over Econet and it provided the older version from DCI-2 days rather than the newer DCI-4 one that was more useful for RISC OS machines by that point, but it’s a while ago now and the finer details may have escaped me. It’d have been rather nice to have an Econet FS that ran on RISCiX back then but I don’t recall there being one. I used RISCiX quite a bit in the mid/late ’90s, the computer lab at the University of Newcastle (where I did an MSc) had a room full for R260 workstations that we used as terminals. |
James Pankhurst (8374) 126 posts |
Lucky you! Outside of my school, only time I saw an Acorn machine was on top of a filing cabinet in Steve Furbers office. |
Alan Williams (2601) 88 posts |
Ok well I stand corrected on the Ether3 card then. However that was done it did not reach Australia! I agree an EconetFS on RISC iX would have been interesting. I wrote an Econet print server for it, so you could print from RISC OS to RISC iX over Econet. Ecoterm implemented enough FS functions to supply a !boot file and a terminal emulator to a BBC that tried to log in. I used to serve NFS mounts from RISC OS to RISC iX back to Econet via !awServer, that was my conference party trick. Do *. on a beeb and it shows a unix root directory. In Melbourne there was a Lab of R140 at tertiary ed facility in Footscray I forget its name now and its probably changed several times since. The maths department at Latrobe uni had a few too (Geof Prince I think), as did the language centre (Chris Pound). The maths department had a 500M hard drive which cost them an absolute fortune in the day. We ran UUCP mail between Acorn Melbourne and Cambridge over a 9600 baud Trailblazer modem. With a fabulously memorable mail client that ran over nfs and had a pregnant red postbox look when mail arrived. |
David Feugey (2125) 2709 posts |
It would be nice to be able to use RISCiX under ArchiEmu… |
Rick Murray (539) 13850 posts |
For anybody that might be interested, I’ve pulled apart the behaviour of the MEMC and spent this weekend messing around with it. Saturday – looking at what the MEMC is, how it behaves and splits up memory. I’ve also written a better CAMdump in assembler, and tested it on ArchiEmu on Arthur 0.30, Arthur 1.20, RISC OS 2.00, RISC OS 2.01, and RISC OS 3.11. Today – looking in more detail at how logical pages and physical pages are related, in order to make sense of the CAM page table. Demonstrated by changing something in physical memory and having the logical memory change accordingly; after working out where the physical memory is from the page table. Have fun. ;-) Now to make tagliatelle and watch Netflix for the rest of the day… |
Rick Murray (539) 13850 posts |
<newb> Holy crap, you’re running Unix in a Beeb!!!!111!!ONE!1! </newb>
Oh, that’s Postman supplied with RISC OS 2, I think. But needed Econet. A friend and I wrote a version for the BBC/Master machines so messages could be shuffled around the school network. I think I must have (re)written PostMan about a dozen times to add/change stuff. Likewise for the 6502 versions. My friend, uh… god, what was his name? Anyway, he moved more and more of it towards assembler so it ran at a pleasing speed on slow hardware. [it’s a running gag in my SIBA stories (off my blog) that the message software gets rewritten numerous times ;-) but we kept the pregnant mailbox (and even made an icon using some characters of a redefined VDU font for the 6502 version!) because, well, it was kind of cute ] |
Steve Pampling (1551) 8172 posts |
Appropos blog entries
Brexit/Covid-19/Shiny
Wait a few years/decades and you will remember – you probably won’t recall anything recent and the last meal you had will be a total mystery. |
Clive Semmens (2335) 3276 posts |
The only difference, however, is that you may be aware that the last meal you had is a mystery. The fact is, it always was, but you never noticed because you never thought about it, there were more important things to think about. You weren’t bored witless. I often don’t know what day of the week it is nowadays; the simple reason is that it doesn’t matter a toss to me now what day of the week it is. (Happily I’m not bored witless.) |
Steve Pampling (1551) 8172 posts |
In the current state of the world that applies to a lot of people.
Yeah, about that stuff. It’s been over 6 months so, with the exception of afflicted persons, people should be popping up lots of new software/OS developments around now. |
Alan Williams (2601) 88 posts |
LOL, yes. Some of the earlier posts on this topic about compiling the 4.3BSD source and i386 memory management being quite different to ARM bothered me but its taken until now to remember why. The 4.3BSD source is for the VAX architecture. Its first showing on i386 wasn’t until the start of FreeBSD family. Alan |
Paolo Fabio Zaino (28) 1882 posts |
@ Alan
Maybe you want to dig a little more: https://en.wikipedia.org/wiki/386BSD The 386 version of 4.3BSD was called 386BSD, way before FreeBSD. It was based on 4.3BSD, portions of 4.3BSD Net/2 and had added pieces same way RISCiX had to have. it was released to the public in 1992 for the record, sources are still around. FreeBSD etc. are “sons” of 386BSD. |