MMFS and Pi1Mhz JIM ram disk

bbc/electron apps, languages, utils, educational progs, demos + more
User avatar
dudleysoft71
Posts: 298
Joined: Tue May 26, 2020 6:56 pm
Contact:

MMFS and Pi1Mhz JIM ram disk

Post by dudleysoft71 »

At the Thursday evening ABUG dev night, I started working on adding support to MMFS for the external ram provided by the Pi1Mhz. Turns out there's about 480MBytes of ram available on a pi zero, more than enough to hold a complete MMB file.

My first experiment didn't quite work out, I started from the wrong source file, I chose the User port, which had too much code, I tried again with the Memory mapped, which was much closer to what I needed.

I copied Tricky's menu MMB file onto my Pi1Mhz SD card root, named it JIM_Init.bin, tried the rom on my Beeb and got Card? Error message.

Turns out I needed to handle some initialisation messages to the mmc card and pretend we've got a card. Once I'd done that suddenly I could run *DCAT and *. though something else was wrong.

JIM ram is paged in 256 byre chunks, the SD card reads in 512byte chunks, so it was reading the same 256 bytes twice, whoops.

I fixed that, or so I thought, Turns out its slightly more complex dealing with the 512 byte sectors, but it looked like it was working, so I tried to boot tricky's menu.

More errors, I discovered that after trying to boot the disc the directory was being corrupted, not the copy in JIM ram, but the version in memory.

Strangely I can *DUMP and *TYPE files fine, so OSFIND and OSBGET seem to be working fine, however it fails if I try to LOAD or *LOAD a file (*LOAD fails spectacularly it seems to corrupt the catalogue before it even looks for the file, and returns Not found)

This is the current state, so close, yet still so far. I've played around a bit more today, but still no luck getting code to run.
James Watson - DudleySoft

BBC Model B 32K - PiTubeDirect, Pi1Mhz, Smally Mouse, Gotek, DFS/ADFS, 4xSWRAM.
dp11
Posts: 1757
Joined: Sun Aug 12, 2012 9:47 pm
Contact:

Re: MMFS and Pi1Mhz JIM ram disk

Post by dp11 »

Interesting idea. It could mean PAGE could be kept very low as very as there is reasonablely fast ram available. I could add a write function to Pi1MHz.

You probably want to disable the music5000 emulation as that uses the same memory. It might make strange noises if not.

Thinking about it, would you like a location to read that has auto increment so that you don't need indexed addressing?
User avatar
dudleysoft71
Posts: 298
Joined: Tue May 26, 2020 6:56 pm
Contact:

Re: MMFS and Pi1Mhz JIM ram disk

Post by dudleysoft71 »

Okay, that explains why I could hear a strange noise when I turn on.

A write back feature would be great, I had thought about that and the easiest way seems to be to set a dirty flag when you write to JIM and then save the previous page if it's dirty when you change page. To make the code work I increment the page after every block read/write because it doesn't automatically happen since the MMC driver assumes 512 byte blocks, so the page will always change after a write so nothing will get lost.
James Watson - DudleySoft

BBC Model B 32K - PiTubeDirect, Pi1Mhz, Smally Mouse, Gotek, DFS/ADFS, 4xSWRAM.
User avatar
dudleysoft71
Posts: 298
Joined: Tue May 26, 2020 6:56 pm
Contact:

Re: MMFS and Pi1Mhz JIM ram disk

Post by dudleysoft71 »

I've sorted out the issues I was having, I changed up my MMC emulation so it correctly handles reading 512 bytes without having a new command, and I discovered a small quirk with the JIM paging registers, turns out I have to write the page from low to high, otherwise the highest byte of the address doesn't seem to work properly.

I'd like people to test the different builds since I can only test of a BBC Model B so I'd like to know it works on other systems.

What you need:

This file:
mmfs.ssd
(200 KiB) Downloaded 5 times
Acorn computer with 1MHz bus (may work with Compact 2MHz bus version)
Raspberry Pi connected to 1MHz bus running Pi1Mhz software.
Sideways RAM or an EEPROM/EPROM that you can program the ROM image to.

Instructions:
  • Rename the file to JIM_Init.bin and copy this file to the root of your Pi 1MHz SD card (it must be called JIM_Init.bin to work)
  • *MMFS (or *DISC if emulation is enabled) should select the file system, if MMFS is your default file system then you should be able to Shift-Boot
    into the menu
Writing hasn't been tested since all tricky's disks are protected, and there's no write back so you'll lose any changes when you turn off.
James Watson - DudleySoft

BBC Model B 32K - PiTubeDirect, Pi1Mhz, Smally Mouse, Gotek, DFS/ADFS, 4xSWRAM.
User avatar
KenLowe
Posts: 4675
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: MMFS and Pi1Mhz JIM ram disk

Post by KenLowe »

Sounds good =D> =D> =D>.
dudleysoft71 wrote: Tue Mar 12, 2024 12:28 pm I'd like people to test the different builds since I can only test of a BBC Model B so I'd like to know it works on other systems.
I'll give this a try this evening.
dudleysoft71 wrote: Tue Mar 12, 2024 12:28 pm
  • Copy an appropriate MMFS ROM image to a place you can install it on your beeb (HDD, ECONET or burn a rom)
I assume I just need to take an appropriate ROM image out of the MMFS.ssd disc image you attached?
User avatar
dudleysoft71
Posts: 298
Joined: Tue May 26, 2020 6:56 pm
Contact:

Re: MMFS and Pi1Mhz JIM ram disk

Post by dudleysoft71 »

Yeah, there should be all the usual MMFS builds in there, it simply replaces the low level MMC code with code to read from JIM memory, so in theory all the builds should work since FRED and JIM are in the same places.
James Watson - DudleySoft

BBC Model B 32K - PiTubeDirect, Pi1Mhz, Smally Mouse, Gotek, DFS/ADFS, 4xSWRAM.
User avatar
KenLowe
Posts: 4675
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: MMFS and Pi1Mhz JIM ram disk

Post by KenLowe »

dudleysoft71 wrote: Tue Mar 12, 2024 3:23 pm in theory all the builds should work since FRED and JIM are in the same places.
Ah, ok. That's what I wasn't sure about. Thanks for clarifying. I normally use a SWMMFS version on my beeb, so that's what I'll pick out. I'll also select an appropriate one for my Master.
User avatar
KenLowe
Posts: 4675
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: MMFS and Pi1Mhz JIM ram disk

Post by KenLowe »

Hmmm. Something's not working quite right on my beeb.

Firstly, I checked that RAMFS was working, which it was:
RAMFS
RAMFS
Then I replaced RAMFS with the MMFS ROM from the disc above, but I'm seeing corruption:
1MHzMMFS
1MHzMMFS
The SD card has quite a lot of junk on it, so I wonder if that is making any difference. I'll try a clean install of Pi1MHz and add in BEEB.MMB (renamed to JIM_Init.bin) to see if that makes any difference...

Edit, ok, so same result with a clean install of Pi1MHz (latest, v1.07), and a known good version of BEEB.MMB (renamed to JIM_Init.bin). SD card is 64GB, and has been formatted FAT32.
User avatar
dudleysoft71
Posts: 298
Joined: Tue May 26, 2020 6:56 pm
Contact:

Re: MMFS and Pi1Mhz JIM ram disk

Post by dudleysoft71 »

Okay, can you tell me what happens if you do *DCAT?
Does it show a list of disc images?

By default disc 0 should be inserted in drive 0 so you should just just be catalogue the disk straight off.

Can you dump memory at &FD00, see what it contains.

It's seems strange, is RAMFS installed as well as MMFS? The pi1mhz initialises memory from JIM_Init.bin at boot and then doesn't touch it again, so if RAMFS does any initialisation of its own it might be overwriting the data in the JIM ram.

Looking at it the memory in the disk image is &55, so that suggests the memory has been initialised to a fixed value.
James Watson - DudleySoft

BBC Model B 32K - PiTubeDirect, Pi1Mhz, Smally Mouse, Gotek, DFS/ADFS, 4xSWRAM.
User avatar
KenLowe
Posts: 4675
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: MMFS and Pi1Mhz JIM ram disk

Post by KenLowe »

On initial power up P. $&FD00 shows the correct information. *DCAT then shows the following:
*DCAT
*DCAT
So, I've got both RAMFS and 1MHzMMF installed in the computer at the same time. I'm using this with my IntegraB board, where I can use the *UNPLUG / *INSERT commands to make sure only one FS is active at any one time. I'm confident that is working fine, but I can physically remove the ROM images from the IntegraB if it would help eliminate things.

I'm wondering if there's a problem with Pi1MHz reading the Jim_Init.bin file? I'm using quite a large SD card.
User avatar
hoglet
Posts: 12663
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: MMFS and Pi1Mhz JIM ram disk

Post by hoglet »

KenLowe wrote: Tue Mar 12, 2024 8:15 pm So, I've got both RAMFS and 1MHzMMF installed in the computer at the same time. I'm using this with my IntegraB board, where I can use the *UNPLUG / *INSERT commands to make sure only one FS is active at any one time.
I'm still slightly suspicious this is down to RAMFS. If it's not too much trouble, can you physically unplug it?

Dave
User avatar
KenLowe
Posts: 4675
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: MMFS and Pi1Mhz JIM ram disk

Post by KenLowe »

hoglet wrote: Tue Mar 12, 2024 8:21 pm
KenLowe wrote: Tue Mar 12, 2024 8:15 pm So, I've got both RAMFS and 1MHzMMF installed in the computer at the same time. I'm using this with my IntegraB board, where I can use the *UNPLUG / *INSERT commands to make sure only one FS is active at any one time.
I'm still slightly suspicious this is down to RAMFS. If it's not too much trouble, can you physically unplug it?

Dave
So, it's a ROM image in a Write Protected RAM Bank. ?&FE3A=255 to write enable to bottom 8 banks:
*SRWIPE Bank 5
*SRWIPE Bank 5
The ROM has now gone, but 1MHzMMFS is still giving the same:
Still corrupt
Still corrupt
The ROM image in bank 12 is the 1MHzMMFS.
User avatar
hoglet
Posts: 12663
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: MMFS and Pi1Mhz JIM ram disk

Post by hoglet »

KenLowe wrote: Tue Mar 12, 2024 8:30 pm The ROM has now gone, but 1MHzMMFS is still giving the same:
And this is after cycling power?
User avatar
KenLowe
Posts: 4675
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: MMFS and Pi1Mhz JIM ram disk

Post by KenLowe »

hoglet wrote: Tue Mar 12, 2024 8:32 pm
KenLowe wrote: Tue Mar 12, 2024 8:30 pm The ROM has now gone, but 1MHzMMFS is still giving the same:
And this is after cycling power?
Yup, but I'll try again just to make sure...

Edit: Yes, the same after power cycle. I even *UNPLUGged the remaining active banks before power cycling.
Last edited by KenLowe on Tue Mar 12, 2024 8:35 pm, edited 1 time in total.
User avatar
hoglet
Posts: 12663
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: MMFS and Pi1Mhz JIM ram disk

Post by hoglet »

KenLowe wrote: Tue Mar 12, 2024 8:32 pm
hoglet wrote: Tue Mar 12, 2024 8:32 pm And this is after cycling power?
Yup, but I'll try again just to make sure...
I can try to replicate this tomorrow.

Which MMFS ROM image did you use from mmfs.ssd?

Dave
User avatar
KenLowe
Posts: 4675
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: MMFS and Pi1Mhz JIM ram disk

Post by KenLowe »

hoglet wrote: Tue Mar 12, 2024 8:35 pm Which MMFS ROM image did you use from mmfs.ssd?
I've tried both MMFS & SWMMFS.
User avatar
KenLowe
Posts: 4675
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: MMFS and Pi1Mhz JIM ram disk

Post by KenLowe »

I've created a small (128MB) partition on the SD Card, copied over PiFS v1.07 again, and copied over / renamed the Beeb.MMB file:
SD Card Contents
SD Card Contents
Still the same. It's worth noting that P.$&FD00 always returns the PiFS version information. This never seems to get overwritten.
User avatar
dudleysoft71
Posts: 298
Joined: Tue May 26, 2020 6:56 pm
Contact:

Re: MMFS and Pi1Mhz JIM ram disk

Post by dudleysoft71 »

You shouldn't see the default banner at &FD00, that is only setup if it can't find the JIM_init.bin isn't found.
James Watson - DudleySoft

BBC Model B 32K - PiTubeDirect, Pi1Mhz, Smally Mouse, Gotek, DFS/ADFS, 4xSWRAM.
User avatar
KenLowe
Posts: 4675
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: MMFS and Pi1Mhz JIM ram disk

Post by KenLowe »

Yeah, I agree. But per the attachment in my previous post, the JIM_init.bin file is there!
User avatar
dudleysoft71
Posts: 298
Joined: Tue May 26, 2020 6:56 pm
Contact:

Re: MMFS and Pi1Mhz JIM ram disk

Post by dudleysoft71 »

Dominic might be able to help since he wrote Pi1Mhz, I just stuck the file in the root and it loaded straight into JIM memory.
Screenshot_20240312_211246_Chrome.jpg
As far as I can see it should just be the file, unless there's an issue with the file somehow. I can't imagine it's that it's too big to fit in memory.
James Watson - DudleySoft

BBC Model B 32K - PiTubeDirect, Pi1Mhz, Smally Mouse, Gotek, DFS/ADFS, 4xSWRAM.
User avatar
KenLowe
Posts: 4675
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: MMFS and Pi1Mhz JIM ram disk

Post by KenLowe »

Which beeb.mmb file have you been testing with? I can try the same one here.

Also, what version of Pi are you using, and how much memory is available to the RAM Disc?
Last edited by KenLowe on Tue Mar 12, 2024 9:24 pm, edited 1 time in total.
dp11
Posts: 1757
Joined: Sun Aug 12, 2012 9:47 pm
Contact:

Re: MMFS and Pi1Mhz JIM ram disk

Post by dp11 »

Is there another partition on the card that is being used instead ?
User avatar
KenLowe
Posts: 4675
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: MMFS and Pi1Mhz JIM ram disk

Post by KenLowe »

dp11 wrote: Tue Mar 12, 2024 9:23 pm Is there another partition on the card that is being used instead ?
I've tried a couple of different cards. Initially only one partition using the full space of the card. Subsequently I changed one of the cards so it had one much smaller partition, with the rest of the card uninitialized. All behaved in the same way.
User avatar
dudleysoft71
Posts: 298
Joined: Tue May 26, 2020 6:56 pm
Contact:

Re: MMFS and Pi1Mhz JIM ram disk

Post by dudleysoft71 »

I was test wirh tricky's game menu, I posted a link to the thread with the latest download.

I just renamed the file and I worked, does the HDD work on the Pi?
James Watson - DudleySoft

BBC Model B 32K - PiTubeDirect, Pi1Mhz, Smally Mouse, Gotek, DFS/ADFS, 4xSWRAM.
User avatar
KenLowe
Posts: 4675
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: MMFS and Pi1Mhz JIM ram disk

Post by KenLowe »

dudleysoft71 wrote: Tue Mar 12, 2024 9:44 pm I was test wirh tricky's game menu, I posted a link to the thread with the latest download.

I just renamed the file and I worked
Ok, I'll test specifically with that one.
dudleysoft71 wrote: Tue Mar 12, 2024 9:44 pm does the HDD work on the Pi?
Yes, ADFS and RAMFS both work fine.
User avatar
KenLowe
Posts: 4675
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: MMFS and Pi1Mhz JIM ram disk

Post by KenLowe »

dudleysoft71 wrote: Tue Mar 12, 2024 9:44 pm I was test wirh tricky's game menu, I posted a link to the thread with the latest download.
That link isn't quite right. It's missing the final digit. Here's the correct link:

https://www.stardot.org.uk/forums/viewtopic.php?t=16070

Edit: And it's still the same.
User avatar
dudleysoft71
Posts: 298
Joined: Tue May 26, 2020 6:56 pm
Contact:

Re: MMFS and Pi1Mhz JIM ram disk

Post by dudleysoft71 »

I'm at a loss, everything looks correct, just as a test try a smaller file in JIM_Init.bin, I don't have any MMB tools around so I can't create one, but if you put a text file there you should be able to check by printing $&FD00 and seeing if the text file has loaded.
James Watson - DudleySoft

BBC Model B 32K - PiTubeDirect, Pi1Mhz, Smally Mouse, Gotek, DFS/ADFS, 4xSWRAM.
User avatar
KenLowe
Posts: 4675
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: MMFS and Pi1Mhz JIM ram disk

Post by KenLowe »

Yeah, it's weird. I've just copied the config.txt file from the SD Card and renamed it as JIM_Init.bin, but P.$&FD00 still shows the Pi1MHz version / build number and CPU temperature. It just doesn't seem to be reading the JIM_Init.bin file on initial power up.

I re-enabled my ADFS ROM, and checked that I could still read the scsi0.dat file in my BeebSCSI0 folder, and that's still working fine, so I don't don't know what's going wrong either.
User avatar
dudleysoft71
Posts: 298
Joined: Tue May 26, 2020 6:56 pm
Contact:

Re: MMFS and Pi1Mhz JIM ram disk

Post by dudleysoft71 »

Ken, can you zip up your SD card contents and send them to me? Something very strange is happening here, I don't believe it's anything to do with MMFS or RAMFS, I would like to test it on my beeb and see what it does.
James Watson - DudleySoft

BBC Model B 32K - PiTubeDirect, Pi1Mhz, Smally Mouse, Gotek, DFS/ADFS, 4xSWRAM.
User avatar
KenLowe
Posts: 4675
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: MMFS and Pi1Mhz JIM ram disk

Post by KenLowe »

Yup, I can do that for you this evening.
Post Reply

Return to “8-bit acorn software: other”