Pi1MHz Software

discuss both original and modern hardware for the bbc micro/electron
dp11
Posts: 1762
Joined: Sun Aug 12, 2012 9:47 pm
Contact:

Re: Pi1MHz Software

Post by dp11 »

hoglet wrote: Mon Apr 29, 2024 7:35 am
dp11 wrote: Sun Apr 28, 2024 10:42 pm New 6502code.bin file which should add the system via wite.

Code: Select all

    LDA #&7F
    STA &FE4E
    LDA #200
    LDX #3
    JSR OSBYTE
    JMP (&FFFC) ; Reset
If you are short of space, I suspect the subseqent OSEBYTE (*FX 200,3) is now superfluous, as a power up BREAK always triggers a memory clear.

Dave
Always glad to have space Dave , thanks.
User avatar
Mince
Posts: 525
Joined: Thu Sep 05, 2019 11:25 pm
Location: Cambridge, UK
Contact:

Re: Pi1MHz Software

Post by Mince »

Have I missed something subtly changing between 1.13 and this latest version published yesterday (20240428), at least as far as the Electron is concerned?

I'm using the ESWMMFS version of MMFS1, with the Jim RAM build, loaded into a SWRAM bank.

If I format the card with the SD Card Association formatter, then copy everything from the Pi1MHz_20240428_1442_root directory on, then BEEB.MMB, I get "disc not formatted" for disc 0 and a corrupted *DCAT same as Ken got a while ago here: https://www.stardot.org.uk/forums/viewt ... 33#p419533

If I re-format the card, then put on the 1.13 build and copy the BEEB.MMB back on, I get a perfectly working MMFS with *DCAT, etc.
BBC Master— PiTube 3A+ PiVDU, PicoTube, Pi1MHz, MMFS, ANFS, MultiOS
BBC B — Integra ß, PiTube Zero 2W, Pi1MHz, MMFS, DFS, ADFS, ANFS
Electron — Plus 1 w/ AP6 2V2, AP5, PiTube 3A+, Pi1MHz, PRES AP3+4, Elkeconet or ATI/ABR, ElkSD 64/Plus 1
User avatar
KenLowe
Posts: 4688
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: Pi1MHz Software

Post by KenLowe »

Mince wrote: Mon Apr 29, 2024 11:26 pm Have I missed something subtly changing between 1.13 and this latest version published yesterday (20240428), at least as far as the Electron is concerned?

I'm using the ESWMMFS version of MMFS1, with the Jim RAM build, loaded into a SWRAM bank.

If I format the card with the SD Card Association formatter, then copy everything from the Pi1MHz_20240428_1442_root directory on, then BEEB.MMB, I get "disc not formatted" for disc 0 and a corrupted *DCAT same as Ken got a while ago here: https://www.stardot.org.uk/forums/viewt ... 33#p419533

If I re-format the card, then put on the 1.13 build and copy the BEEB.MMB back on, I get a perfectly working MMFS with *DCAT, etc.
I think you probably need a later version of ESWMMFS for Pi1MHz. You'd need to build it from the sources here:

https://github.com/dp111/MMFS

I could do that for you, if it would help.

Edit: Give this version a try. It's not the very latest. It's a version I built yesterday (shortly after commit 1f6e065), but it should still work with this latest version of Pi1MHz. I'm not sure you'll be able to use the special helper function, that allows you to load a ROM image from Pi1MHz to a SWR bank, with the Electron though. It will depend on how RAM banks are selected on the Electron.
Attachments
ESWMMFS.rar
Pi1MHz MMFS for Electron
(9.68 KiB) Downloaded 3 times
User avatar
Mince
Posts: 525
Joined: Thu Sep 05, 2019 11:25 pm
Location: Cambridge, UK
Contact:

Re: Pi1MHz Software

Post by Mince »

Thanks — I'd just assembled that up myself but I'm just getting hanging when I try *. or *DCAT, now. That's the same whether I use your version or the one I assembled.

(Just to confirm, I'm using the one in build/MMFS/1/ESWMMFS.rom — I presume that's the correct one?)

The ADFS HDD in the BeebSCSI folder works fine, and P. $&FD00 gives Pi1MHz v1.16. Have I missed another change out here, like BEEB.MMB now going in a folder?
BBC Master— PiTube 3A+ PiVDU, PicoTube, Pi1MHz, MMFS, ANFS, MultiOS
BBC B — Integra ß, PiTube Zero 2W, Pi1MHz, MMFS, DFS, ADFS, ANFS
Electron — Plus 1 w/ AP6 2V2, AP5, PiTube 3A+, Pi1MHz, PRES AP3+4, Elkeconet or ATI/ABR, ElkSD 64/Plus 1
User avatar
KenLowe
Posts: 4688
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: Pi1MHz Software

Post by KenLowe »

Mince wrote: Tue Apr 30, 2024 12:14 am Thanks — I'd just assembled that up myself but I'm just getting hanging when I try *. or *DCAT, now. That's the same whether I use your version or the one I assembled.

(Just to confirm, I'm using the one in build/MMFS/1/ESWMMFS.rom — I presume that's the correct one?)

The ADFS HDD in the BeebSCSI folder works fine, and P. $&FD00 gives Pi1MHz v1.16. Have I missed another change out here, like BEEB.MMB now going in a folder?
I think that's the correct ROM. That's the one I attached to my last post.

Have you tried the ESWMMFS.rom in the MMFS2 directory (the one that doesn't need beeb.mmb) to see if it behaves any differently? Also, what about the EMMFS version? Does that work? I presume that's a version that lifts PAGE, in the same way as the beeb version does, but I'm not certain because I'm not that familiar with the Electron.

Edit: Here's the details of the various versions. I'd certainly try the build/MMFS/1/EMMFS.rom version:

Code: Select all

EMMFS.rom    - Electron MMFS (PAGE=&1900)
ESWMMFS.rom  - Electron MMFS using SWRAM (PAGE=&E00)
ZEMMFS.rom   - Electron MMFS using SWRAM (PAGE=&E00) wrapped with bootloader
EMMFSDB.rom  - Electron MMFS with debug enabled (PAGE=&1900)
User avatar
Mince
Posts: 525
Joined: Thu Sep 05, 2019 11:25 pm
Location: Cambridge, UK
Contact:

Re: Pi1MHz Software

Post by Mince »

EMMFS gives the same hang.

Loading EMMFSDB and typing *DCAT, it prints the following and then hangs, if this helps anyone:

FF400000000095:01
FF4100000000FF:00
FF7700000000FF:00
FF6940000000FF:00
FF7A00000000FF:00
FF5000000200FF:00
FF4A00000000FF:00
BBC Master— PiTube 3A+ PiVDU, PicoTube, Pi1MHz, MMFS, ANFS, MultiOS
BBC B — Integra ß, PiTube Zero 2W, Pi1MHz, MMFS, DFS, ADFS, ANFS
Electron — Plus 1 w/ AP6 2V2, AP5, PiTube 3A+, Pi1MHz, PRES AP3+4, Elkeconet or ATI/ABR, ElkSD 64/Plus 1
dp11
Posts: 1762
Joined: Sun Aug 12, 2012 9:47 pm
Contact:

Re: Pi1MHz Software

Post by dp11 »

There have been quite a lot of changes and improvements. But it appears I've broken the electron version.
From power up what does X%=0:CALL FC88 give?
User avatar
Mince
Posts: 525
Joined: Thu Sep 05, 2019 11:25 pm
Location: Cambridge, UK
Contact:

Re: Pi1MHz Software

Post by Mince »

That just prints lots of blank spaces and scrolls off the screen.

Looking in EXMON and disassembling, I can see there is nonsense at &FD00 but, when I write 0 to &FC88, I can see the code at &FD00 copied in and it looks sensible but it's just printing the blank spaces when run. I haven't looked any further than that yet, if there's something specific you want me to check for.
BBC Master— PiTube 3A+ PiVDU, PicoTube, Pi1MHz, MMFS, ANFS, MultiOS
BBC B — Integra ß, PiTube Zero 2W, Pi1MHz, MMFS, DFS, ADFS, ANFS
Electron — Plus 1 w/ AP6 2V2, AP5, PiTube 3A+, Pi1MHz, PRES AP3+4, Elkeconet or ATI/ABR, ElkSD 64/Plus 1
dp11
Posts: 1762
Joined: Sun Aug 12, 2012 9:47 pm
Contact:

Re: Pi1MHz Software

Post by dp11 »

I think that implies the pi is seeing a load of glitches and the auto increment gets confused. Just to check can you single step the code at FD00 and if silly data is returned?
User avatar
hoglet
Posts: 12678
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: Pi1MHz Software

Post by hoglet »

dp11 wrote: Tue Apr 30, 2024 6:45 am There have been quite a lot of changes and improvements. But it appears I've broken the electron version.
This optimization looks dubious to me:
bug1.PNG
The BMI on line 279 is now branching on sign of X rather than A.
User avatar
Mince
Posts: 525
Joined: Thu Sep 05, 2019 11:25 pm
Location: Cambridge, UK
Contact:

Re: Pi1MHz Software

Post by Mince »

Single stepping the code at &FD00 in EXMON II seems to loop around &FD12. LDA &FCD9 seems to yield &FF each time.

Would this affect MMFS too?
BBC Master— PiTube 3A+ PiVDU, PicoTube, Pi1MHz, MMFS, ANFS, MultiOS
BBC B — Integra ß, PiTube Zero 2W, Pi1MHz, MMFS, DFS, ADFS, ANFS
Electron — Plus 1 w/ AP6 2V2, AP5, PiTube 3A+, Pi1MHz, PRES AP3+4, Elkeconet or ATI/ABR, ElkSD 64/Plus 1
dp11
Posts: 1762
Joined: Sun Aug 12, 2012 9:47 pm
Contact:

Re: Pi1MHz Software

Post by dp11 »

hoglet wrote: Tue Apr 30, 2024 8:57 am
dp11 wrote: Tue Apr 30, 2024 6:45 am There have been quite a lot of changes and improvements. But it appears I've broken the electron version.
This optimization looks dubious to me:
bug1.PNG
The BMI on line 279 is now branching on sign of X rather than A.
Yes you are right the INX needs to be before the JSR. I remember working that out, but clearly mucked up the commit.
dp11
Posts: 1762
Joined: Sun Aug 12, 2012 9:47 pm
Contact:

Re: Pi1MHz Software

Post by dp11 »

Mince wrote: Tue Apr 30, 2024 9:38 am Single stepping the code at &FD00 in EXMON II seems to loop around &FD12. LDA &FCD9 seems to yield &FF each time.

Would this affect MMFS too?
Can you read back FDD6 onwards and see if they match what was written? I particular each read of FDD9 should increment FDD6
User avatar
hoglet
Posts: 12678
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: Pi1MHz Software

Post by hoglet »

dp11 wrote: Tue Apr 30, 2024 10:34 am Can you read back FDD6 onwards and see if they match what was written? I particular each read of FDD9 should increment FDD6
The issue with the ElectronAP5 is that addresses &FCDx are not mapped to the 1MHz bus, because they are used by several Elk cartridges as the lock /unlock registers. In fact, &FCD7 is the AP5 version register.

Currently the following blocks are mapped: &FC0x, &FC1x, &FC2x (write only), &FC3x, &FC4x, &FC8x, &FCAx, &FCFx

Could the Electron use &FCAx?

Dave
dp11
Posts: 1762
Joined: Sun Aug 12, 2012 9:47 pm
Contact:

Re: Pi1MHz Software

Post by dp11 »

hoglet wrote: Tue Apr 30, 2024 10:57 am
dp11 wrote: Tue Apr 30, 2024 10:34 am Can you read back FDD6 onwards and see if they match what was written? I particular each read of FDD9 should increment FDD6
The issue with the ElectronAP5 is that addresses &FCDx are not mapped to the 1MHz bus, because they are used by several Elk cartridges as the lock /unlock registers. In fact, &FCD7 is the AP5 version register.

Currently the following blocks are mapped: &FC0x, &FC1x, &FC2x (write only), &FC3x, &FC4x, &FC8x, &FCAx, &FCFx

Could the Electron use &FCAx?

Dave
Well spotted . I can move it to FCAx .

I'll recompile everything tonight.
User avatar
KenLowe
Posts: 4688
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: Pi1MHz Software

Post by KenLowe »

Does the Electron also use &FE34 to page in RAM / ROM banks?
dp11
Posts: 1762
Joined: Sun Aug 12, 2012 9:47 pm
Contact:

Re: Pi1MHz Software

Post by dp11 »

Latest version attached. I have also attached the MMFS builds as well. Thanks for all the test and comments so far.
Attachments
mmfs.ssd
(200 KiB) Downloaded 5 times
mmfs2.ssd
(200 KiB) Downloaded 4 times
Pi1MHz_20240430_1902_root.zip
(1.3 MiB) Downloaded 5 times
User avatar
hoglet
Posts: 12678
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: Pi1MHz Software

Post by hoglet »

KenLowe wrote: Tue Apr 30, 2024 7:08 pm Does the Electron also use &FE34 to page in RAM / ROM banks?
No it doesn't - it uses FE05 so a different ROM loader will be needed.

And it's a bit more complicated than just a singe write:

Code: Select all

        MACRO  page_rom_x
        pha
        lda    #&0F
        sta    &f4
        sta    &fe05
        pla
        stx    &f4
        stx    &fe05
        ENDMACRO
Dave
dp11
Posts: 1762
Joined: Sun Aug 12, 2012 9:47 pm
Contact:

Re: Pi1MHz Software

Post by dp11 »

So If my SWR loader could detect if it was running on an electron can I use the same SWMMFS.rom as the beeb and master ? No idea how to create the code space yet.
User avatar
KenLowe
Posts: 4688
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: Pi1MHz Software

Post by KenLowe »

You would need to use the ESWMMFS rom, I think:

https://www.stardot.org.uk/forums/viewt ... 13#p424013
User avatar
hoglet
Posts: 12678
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: Pi1MHz Software

Post by hoglet »

dp11 wrote: Tue Apr 30, 2024 8:12 pm So If my SWR loader could detect if it was running on an electron can I use the same SWMMFS.rom as the beeb and master ?
There is one small difference: flashing the the LEDs to indicate activity:

Code: Select all

.SetLEDS
IF _ELECTRON_
   LDA &282
   EOR #&80
   STA &282
   STA &FE07
ELSE
   LDX #&6
   STX &FE40
   INX
   STX &FE40
ENDIF
The Beeb code would I think mess with the interrupt enable register in the Elk ULA.

Shame there isn't a clean way to do this - it would be nice to get rid of Electron specific builds.

Dave
dp11
Posts: 1762
Joined: Sun Aug 12, 2012 9:47 pm
Contact:

Re: Pi1MHz Software

Post by dp11 »

hoglet wrote: Tue Apr 30, 2024 8:34 pm
dp11 wrote: Tue Apr 30, 2024 8:12 pm So If my SWR loader could detect if it was running on an electron can I use the same SWMMFS.rom as the beeb and master ?
There is one small difference: flashing the the LEDs to indicate activity:

Code: Select all

.SetLEDS
IF _ELECTRON_
   LDA &282
   EOR #&80
   STA &282
   STA &FE07
ELSE
   LDX #&6
   STX &FE40
   INX
   STX &FE40
ENDIF
The Beeb code would I think mess with the interrupt enable register in the Elk ULA.

Shame there isn't a clean way to do this - it would be nice to get rid of Electron specific builds.

Dave
We have space todo a runtime test if we could find a bit to hold the machine state unless the OS already has one.
User avatar
hoglet
Posts: 12678
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: Pi1MHz Software

Post by hoglet »

dp11 wrote: Tue Apr 30, 2024 8:44 pm We have space todo a runtime test if we could find a bit to hold the machine state unless the OS already has one.
Actually, there is more than just this difference.

The most significant other difference is the tube data register is at a different address (FCE0 vs FEE0)

There is some cosmetic stuff as well (like the ROM title), and the Elk build excludes *ROMs as this is present in the AP1/6 ROM.

Dave
User avatar
Mince
Posts: 525
Joined: Thu Sep 05, 2019 11:25 pm
Location: Cambridge, UK
Contact:

Re: Pi1MHz Software

Post by Mince »

dp11 wrote: Tue Apr 30, 2024 7:10 pm Latest version attached. I have also attached the MMFS builds as well. Thanks for all the test and comments so far.
Thanks for these — I've loaded that in and now CALL &FC88 gives me the help screen for 1.17.

MMFS (from the SSD you posted) is still not working, although it's now giving me "Card format?" rather than hanging (the previous version still hangs). Is that related to the further conversation, after the updates?
BBC Master— PiTube 3A+ PiVDU, PicoTube, Pi1MHz, MMFS, ANFS, MultiOS
BBC B — Integra ß, PiTube Zero 2W, Pi1MHz, MMFS, DFS, ADFS, ANFS
Electron — Plus 1 w/ AP6 2V2, AP5, PiTube 3A+, Pi1MHz, PRES AP3+4, Elkeconet or ATI/ABR, ElkSD 64/Plus 1
dp11
Posts: 1762
Joined: Sun Aug 12, 2012 9:47 pm
Contact:

Re: Pi1MHz Software

Post by dp11 »

Mince wrote: Tue Apr 30, 2024 10:34 pm
dp11 wrote: Tue Apr 30, 2024 7:10 pm Latest version attached. I have also attached the MMFS builds as well. Thanks for all the test and comments so far.
Thanks for these — I've loaded that in and now CALL &FC88 gives me the help screen for 1.17.

MMFS (from the SSD you posted) is still not working, although it's now giving me "Card format?" rather than hanging (the previous version still hangs). Is that related to the further conversation, after the updates?
Shouldn't be. Can you try the electron mmfsv2 and DCAT? Also using the debug version of electron mmfs what do you get ?

Sorry this might take a little time while I work out what I've done to break it.
User avatar
Mince
Posts: 525
Joined: Thu Sep 05, 2019 11:25 pm
Location: Cambridge, UK
Contact:

Re: Pi1MHz Software

Post by Mince »

No problems — thanks for your help and the work so far!

Starting with EMMFSDB, a *DCAT gives (hoping I've got the right number of zeroes here!):

FF400000000095:01
FF4100000000FF:00
FF7700000000FF:00
FF6940000000FF:00
FF7A00000000FF:00
FF5000000200FF:00
FF4A00000000FF:00
FF5100000000FF:00
FF5100010E00FF:00

For MMFS2, after loading the ROM, I get a startup banner:

Code: Select all

Acorn Electron @ 64K

Electron MMFS2 SWRAM Pi1MHz


Card format?
*DCAT
*.

Drive empty
*
I've not used MMFS2 on the P1MHz before, though, so I might be doing something wrong. Do I just put the SSDs in the root directory of the card, or have to put them in a special directory?
BBC Master— PiTube 3A+ PiVDU, PicoTube, Pi1MHz, MMFS, ANFS, MultiOS
BBC B — Integra ß, PiTube Zero 2W, Pi1MHz, MMFS, DFS, ADFS, ANFS
Electron — Plus 1 w/ AP6 2V2, AP5, PiTube 3A+, Pi1MHz, PRES AP3+4, Elkeconet or ATI/ABR, ElkSD 64/Plus 1
User avatar
KenLowe
Posts: 4688
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: Pi1MHz Software

Post by KenLowe »

For MMFS2, I think your card needs to be formatted FAT32. Then it's just a case of adding .ssd / .dsd files to the root of your SD card. You can probably add then to a specific directory, but I can't remember what the beeb command is to change directories. *DCAT should then list all the files and then you just *DIN or *DBOOT the specific disc image to mount the image.
User avatar
hoglet
Posts: 12678
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: Pi1MHz Software

Post by hoglet »

Just a quick note to say it all seems to work correctly for me on the Elk/AP5:
capture7.png
I'm using MMFSv2 ESWMMFS build just now from Dominic's MMFS fork, manually loaded into slot 4 on my AP6.

Also using the latest Pi 1MHz firmware which declares itself as 1.17.

And with the EMMFSDB build I get:
capture8.png
capture9.png
I suspect a genuine card format issue.

Any chance you could image the whole card?

Dave
dp11
Posts: 1762
Joined: Sun Aug 12, 2012 9:47 pm
Contact:

Re: Pi1MHz Software

Post by dp11 »

Mince wrote: Wed May 01, 2024 8:42 am No problems — thanks for your help and the work so far!

Starting with EMMFSDB, a *DCAT gives (hoping I've got the right number of zeroes here!):

FF400000000095:01
FF4100000000FF:00
FF7700000000FF:00
FF6940000000FF:00
FF7A00000000FF:00
FF5000000200FF:00
FF4A00000000FF:00
FF5100000000FF:00
FF5100010E00FF:00

For MMFS2, after loading the ROM, I get a startup banner:

Code: Select all

Acorn Electron @ 64K

Electron MMFS2 SWRAM Pi1MHz


Card format?
*DCAT
*.

Drive empty
*
I've not used MMFS2 on the P1MHz before, though, so I might be doing something wrong. Do I just put the SSDs in the root directory of the card, or have to put them in a special directory?
Do you know how the card is formatted ? Ideally it should be FAT32. Fat16 works for MMFS also
User avatar
Mince
Posts: 525
Joined: Thu Sep 05, 2019 11:25 pm
Location: Cambridge, UK
Contact:

Re: Pi1MHz Software

Post by Mince »

Thanks — I'll check tonight. I format the card with the SD Card Association Formatter but it's 2GB, so I think it should be FAT16. That probably explains MMFS2 but I'm not sure about MMFS, but I'll try that: I have a larger card and can try that instead to see how it behaves.
BBC Master— PiTube 3A+ PiVDU, PicoTube, Pi1MHz, MMFS, ANFS, MultiOS
BBC B — Integra ß, PiTube Zero 2W, Pi1MHz, MMFS, DFS, ADFS, ANFS
Electron — Plus 1 w/ AP6 2V2, AP5, PiTube 3A+, Pi1MHz, PRES AP3+4, Elkeconet or ATI/ABR, ElkSD 64/Plus 1
Post Reply

Return to “8-bit acorn hardware”