MMFS and Pi1Mhz JIM ram disk
- dudleysoft71
- Posts: 298
- Joined: Tue May 26, 2020 6:56 pm
- Contact:
MMFS and Pi1Mhz JIM ram disk
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.
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.
BBC Model B 32K - PiTubeDirect, Pi1Mhz, Smally Mouse, Gotek, DFS/ADFS, 4xSWRAM.
Re: MMFS and Pi1Mhz JIM ram disk
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?
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?
- dudleysoft71
- Posts: 298
- Joined: Tue May 26, 2020 6:56 pm
- Contact:
Re: MMFS and Pi1Mhz JIM ram disk
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.
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.
BBC Model B 32K - PiTubeDirect, Pi1Mhz, Smally Mouse, Gotek, DFS/ADFS, 4xSWRAM.
- dudleysoft71
- Posts: 298
- Joined: Tue May 26, 2020 6:56 pm
- Contact:
Re: MMFS and Pi1Mhz JIM ram disk
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: 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:
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: 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:
- Download a BEEB.MMC drive image (it doesn't work with MMFS2 individual files), you can get tricky's menu here https://www.stardot.org.uk/forums/viewtopic.php?t=1607
- 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)
- Copy an appropriate MMFS ROM image to a place you can install it on your beeb (HDD, ECONET or burn a rom), more info can be found here: https://github.com/hoglet67/MMFS/wiki/Release-structure
- *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
James Watson - DudleySoft
BBC Model B 32K - PiTubeDirect, Pi1Mhz, Smally Mouse, Gotek, DFS/ADFS, 4xSWRAM.
BBC Model B 32K - PiTubeDirect, Pi1Mhz, Smally Mouse, Gotek, DFS/ADFS, 4xSWRAM.
Re: MMFS and Pi1Mhz JIM ram disk
Sounds good .
I'll give this a try this evening.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 assume I just need to take an appropriate ROM image out of the MMFS.ssd disc image you attached?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)
- dudleysoft71
- Posts: 298
- Joined: Tue May 26, 2020 6:56 pm
- Contact:
Re: MMFS and Pi1Mhz JIM ram disk
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.
BBC Model B 32K - PiTubeDirect, Pi1Mhz, Smally Mouse, Gotek, DFS/ADFS, 4xSWRAM.
Re: MMFS and Pi1Mhz JIM ram disk
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.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.
Re: MMFS and Pi1Mhz JIM ram disk
Hmmm. Something's not working quite right on my beeb.
Firstly, I checked that RAMFS was working, which it was:
Then I replaced RAMFS with the MMFS ROM from the disc above, but I'm seeing corruption:
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.
Firstly, I checked that RAMFS was working, which it was:
Then I replaced RAMFS with the MMFS ROM from the disc above, but I'm seeing corruption:
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.
- dudleysoft71
- Posts: 298
- Joined: Tue May 26, 2020 6:56 pm
- Contact:
Re: MMFS and Pi1Mhz JIM ram disk
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.
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.
BBC Model B 32K - PiTubeDirect, Pi1Mhz, Smally Mouse, Gotek, DFS/ADFS, 4xSWRAM.
Re: MMFS and Pi1Mhz JIM ram disk
On initial power up P. $&FD00 shows the correct information. *DCAT then shows the following:
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.
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.
Re: MMFS and Pi1Mhz JIM ram disk
I'm still slightly suspicious this is down to RAMFS. If it's not too much trouble, can you physically unplug it?
Dave
Re: MMFS and Pi1Mhz JIM ram disk
So, it's a ROM image in a Write Protected RAM Bank. ?&FE3A=255 to write enable to bottom 8 banks:
The ROM has now gone, but 1MHzMMFS is still giving the same:
The ROM image in bank 12 is the 1MHzMMFS.
Re: MMFS and Pi1Mhz JIM ram disk
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.
Re: MMFS and Pi1Mhz JIM ram disk
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:
Still the same. It's worth noting that P.$&FD00 always returns the PiFS version information. This never seems to get overwritten.
Still the same. It's worth noting that P.$&FD00 always returns the PiFS version information. This never seems to get overwritten.
- dudleysoft71
- Posts: 298
- Joined: Tue May 26, 2020 6:56 pm
- Contact:
Re: MMFS and Pi1Mhz JIM ram disk
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.
BBC Model B 32K - PiTubeDirect, Pi1Mhz, Smally Mouse, Gotek, DFS/ADFS, 4xSWRAM.
Re: MMFS and Pi1Mhz JIM ram disk
Yeah, I agree. But per the attachment in my previous post, the JIM_init.bin file is there!
- dudleysoft71
- Posts: 298
- Joined: Tue May 26, 2020 6:56 pm
- Contact:
Re: MMFS and Pi1Mhz JIM ram disk
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.
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.
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.
BBC Model B 32K - PiTubeDirect, Pi1Mhz, Smally Mouse, Gotek, DFS/ADFS, 4xSWRAM.
Re: MMFS and Pi1Mhz JIM ram disk
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?
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.
Re: MMFS and Pi1Mhz JIM ram disk
Is there another partition on the card that is being used instead ?
Re: MMFS and Pi1Mhz JIM ram disk
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.
- dudleysoft71
- Posts: 298
- Joined: Tue May 26, 2020 6:56 pm
- Contact:
Re: MMFS and Pi1Mhz JIM ram disk
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?
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.
BBC Model B 32K - PiTubeDirect, Pi1Mhz, Smally Mouse, Gotek, DFS/ADFS, 4xSWRAM.
Re: MMFS and Pi1Mhz JIM ram disk
Ok, I'll test specifically with that one.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
Yes, ADFS and RAMFS both work fine.
Re: MMFS and Pi1Mhz JIM ram disk
That link isn't quite right. It's missing the final digit. Here's the correct link: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.
https://www.stardot.org.uk/forums/viewtopic.php?t=16070
Edit: And it's still the same.
- dudleysoft71
- Posts: 298
- Joined: Tue May 26, 2020 6:56 pm
- Contact:
Re: MMFS and Pi1Mhz JIM ram disk
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.
BBC Model B 32K - PiTubeDirect, Pi1Mhz, Smally Mouse, Gotek, DFS/ADFS, 4xSWRAM.
Re: MMFS and Pi1Mhz JIM ram disk
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.
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.
- dudleysoft71
- Posts: 298
- Joined: Tue May 26, 2020 6:56 pm
- Contact:
Re: MMFS and Pi1Mhz JIM ram disk
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.
BBC Model B 32K - PiTubeDirect, Pi1Mhz, Smally Mouse, Gotek, DFS/ADFS, 4xSWRAM.
Re: MMFS and Pi1Mhz JIM ram disk
Yup, I can do that for you this evening.