Using FE3RD in VICE (was: Re: FE3 RAM Disk)

You need an actual VIC.

Moderator: Moderators

User avatar
javierglez
Vic 20 Hobbyist
Posts: 107
Joined: Sat Jun 03, 2017 3:33 pm

Using FE3RD in VICE (was: Re: FE3 RAM Disk)

Post by javierglez »

Mike wrote: Wed Nov 23, 2016 1:31 am Here's the link to the *.zip of FE3 RAM Disk V1: https://sourceforge.net/projects/vin20/ ... p/download
I downloaded this project folder and tried to run the application in VICE without success. Then I put the files on a d64 image and try again with the same results, as pictured below. It loads and executes SJLOAD, then it fails to load the driver right in the beginning. I tried to trace the error with the monitor, CHKIN returns 5 in reg. A. and then it stops the load. That's right after the OPEN command.

(Maybe I can modify the code to skip the SJLoad part to try the rest of the software, even if disk access will run much slower)
2023-03-23.png
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Using FE3RD in VICE (was: Re: FE3 RAM Disk)

Post by Mike »

When you run FE3RD.PRG in VICE, you will either have TDE off with VDrive, or TDE on and then likely not have a JiffyDOS-enabled emulated drive, unless you supply the drive directories of VICE with the JD-ROM of the relevant drive. In both cases, SJLOAD is bound to fail - it does not seem to have a fallback to the standard KERNAL protocol. FE3RD.PRG thus cannot load the RAM disk driver and reports the ?LOAD error.

On the FE3, you would load FE3RD.PRG from the built-in SD2IEC. This drive supports the JiffyDOS protocol and everything is fine there.

FE3RD.PRG only tries to install SJLOAD if it finds the file SJLOAD$04 in the same directory or disk image FE3RD.PRG was loaded from. When SJLOAD$04 is missing, the FE3 RAM disk uses the standard KERNAL routines when accessing a disk drive. With VICE, that means you can use TDE off with VDrive and get even a higher speed than with the JiffyDOS protocol.

So, no need for you to modify the code. Just remove the file SJLOAD$04 from the unzipped "fe3rd_v1" directory, keep FE3RD.PRG, RDDRV.BIN and RDMAIN.BIN and then it works.
User avatar
javierglez
Vic 20 Hobbyist
Posts: 107
Joined: Sat Jun 03, 2017 3:33 pm

Re: Using FE3RD in VICE (was: Re: FE3 RAM Disk)

Post by javierglez »

Thank you, I got the Final Expansion Alpha last year, it's time to take it out of the drawer.
User avatar
javierglez
Vic 20 Hobbyist
Posts: 107
Joined: Sat Jun 03, 2017 3:33 pm

Re: Using FE3RD in VICE (was: Re: FE3 RAM Disk)

Post by javierglez »

I don't know how to enable the FE extension in VICE, I thought it was enough to tick the checkbox "Enable Final Expansion image write back". I've noticed that the extension isn't actually activated, the RAM bank select in the RAM Disk application does nothing, all the writes go to the same place. Eventually this causes the CPU to jam. The application may be obsolete because it doesn't do the poke to go past the FE start mode.
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Using FE3RD in VICE (was: Re: FE3 RAM Disk)

Post by Mike »

javierglez wrote:I don't know how to enable the FE extension in VICE, [...]
When you provide a firmware ROM in "File > Attach cartridge image ... > Final Expansion image ...", FE3 is automatically installed as cartridge extension within VICE. Upon confirming the choice in the file requester dialog, the emulated VIC-20 resets and you get the FE3 start-up menu.
[...] I thought it was enough to tick the checkbox "Enable Final Expansion image write back".
That option is only of interest if you would want to install cartridge images in the emulated 512K Flash ROM. Correspondingly, that image file can then be modified and grow up to that size.
I've noticed that the extension isn't actually activated, the RAM bank select in the RAM Disk application does nothing, all the writes go to the same place. Eventually this causes the CPU to jam. The application may be obsolete because it doesn't do the poke to go past the FE start mode.
There is neither need nor justification for the RAM disk driver to do such things by itself, when the proper firmware is installed. In general it is a bad idea when low-level tools interfere with functions that are not their business. As you try to run the RAM Disk on essentially non-initialised (emulated) hardware, you should not wonder when things do not work.

Here is the file I use as Final Expansion image to get things going in VICE (download ). It is a fairly old version of the firmware (r020 by the Forum64 group), but should do the job.
User avatar
MrSterlingBS
Vic 20 Enthusiast
Posts: 174
Joined: Tue Jan 31, 2023 2:56 am
Location: Germany,Braunschweig

Re: Using FE3RD in VICE (was: Re: FE3 RAM Disk)

Post by MrSterlingBS »

Hello,

i tried to load the files without JiffyDOS.
After loading i get this error.
vice-screen-2023081521093989.png
vice-screen-2023081521093989.png (3.74 KiB) Viewed 2001 times
The FE3 from the previous is running well.

Hope someone can help.
Last edited by Mike on Tue Aug 15, 2023 1:26 pm, edited 1 time in total.
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Using FE3RD in VICE (was: Re: FE3 RAM Disk)

Post by Mike »

You are running FE3 in VICE, without JiffyDOS, and then you need to remove the file "SJLOAD$04" from the directory (or disk image), see here.
User avatar
MrSterlingBS
Vic 20 Enthusiast
Posts: 174
Joined: Tue Jan 31, 2023 2:56 am
Location: Germany,Braunschweig

Re: Using FE3RD in VICE (was: Re: FE3 RAM Disk)

Post by MrSterlingBS »

Good morning,

the same error is displayed.
I use the DirMaster from "THE WIZ" to create a .d64 disk. Is it because of that?
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Using FE3RD in VICE (was: Re: FE3 RAM Disk)

Post by Mike »

Well, yes, DirMaster has an unfortunate history of producing borked *.d64 images. That ?FILE SIZE MISMATCH error might be an indicator for this (as that is different from the error Javier encountered, ?LOAD ERROR).

Normally, it should not be necessary to transfer those files to a disk image, they work quite as well from a PC directory - that is what VICE VDrive is for. For more details, check here, and as I wrote before, remove SJLOAD$04 from the directory before you run FE3RD.
User avatar
javierglez
Vic 20 Hobbyist
Posts: 107
Joined: Sat Jun 03, 2017 3:33 pm

Re: Using FE3RD in VICE (was: Re: FE3 RAM Disk)

Post by javierglez »

Yes, this issue looks similar to the one I had. I'm attaching an image depicting Mike's instructions. Click on it to see it a little larger.
2023-08-16 (2).png
In order to study or use this program, I think there's little advantage compared to the standard FE3 ROM, where it ended up being integrated. I advice to check the code on github as it's well commented, https://github.com/ops/FE3-Firmware.
User avatar
MrSterlingBS
Vic 20 Enthusiast
Posts: 174
Joined: Tue Jan 31, 2023 2:56 am
Location: Germany,Braunschweig

Re: Using FE3RD in VICE (was: Re: FE3 RAM Disk)

Post by MrSterlingBS »

Thanks for your help.
I give up, it just doesn't work.
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Using FE3RD in VICE (was: Re: FE3 RAM Disk)

Post by Mike »

javierglez wrote:I think there's little advantage compared to the standard FE3 ROM, where it ended up being integrated.
"It"?

I checked ops' repo, and there SJLOAD got integrated into the FE3 firmware, not FE3RD. That makes this firmware particularly unfit for use in VICE, given that VICE actually only emulates the FE2 "core" (and FE3 = FE2 + SD2IEC - both circuits only share the +5V supply rail and are otherwise separate!) and no SD2IEC with its implied JD capability. Without a functioning KERNAL fallback in SJLOAD, that only serves trouble.
MrSterlingBS wrote:[...] it just doesn't work.
Of course it works in VICE! How otherwise could I have tested the tool? In VICE, that is.

For the record, here's how I start up FE3RD in VICE. First, I select the FE3 firmware file in the appropriate request box:

Image

VICE resets and shows the start-up screen of FE3. I press F1 to enter the RAM manager:

Image

In the RAM manager, I deselect (.) the Easy Wedge and select (x) the I/O registers (otherwise FE3RD would have a hard time controlling the FE3 hardware!). Then I press F7 for "All RAM" (which includes the +3K in RAMx and +8K in BLK5):

Image

I get a fairly normal startup message of BASIC V2, and mount the FE3 directory within my VICE installation as disk. I installed that directory there by myself, it contains the file with the FE3 firmware as well as all files of the FE3 RAM Disk (except SJLOAD$04):

Image

A quick check whether that directory is actually mounted as disk, with LOAD"$",8 and LIST:

Image

... and here's the result. Everything's fine as expected:

Image

LOAD"FE3RD.PRG",8 and RUN and there you go!

Image
User avatar
MrSterlingBS
Vic 20 Enthusiast
Posts: 174
Joined: Tue Jan 31, 2023 2:56 am
Location: Germany,Braunschweig

Re: Using FE3RD in VICE (was: Re: FE3 RAM Disk)

Post by MrSterlingBS »

Dear Mike,

thank you for your help.
I found the bug.
The file RDDRV and RDMAIN did not have the extension .BIN in the file name.

Now everything worked.

Thank you.
User avatar
MrSterlingBS
Vic 20 Enthusiast
Posts: 174
Joined: Tue Jan 31, 2023 2:56 am
Location: Germany,Braunschweig

Re: Using FE3RD in VICE (was: Re: FE3 RAM Disk)

Post by MrSterlingBS »

Okay, I can save the PICS from the MINIGRAFIK MANDELBROT DISK (8) to the RAM DISK (13).
I load them with the SLIDESHOW.PRG after changing the DN=PEEK(186) to 13.
But after the first PIC the VIC Crashs and resets.

I will try it once more at the weekend.

BR
Sven
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Using FE3RD in VICE (was: Re: FE3 RAM Disk)

Post by Mike »

Hint 1: copying files with LOAD and SAVE generally only works with BASIC programs.
Hint 2: MG picture files, even though they show a SYS line when LISTed, are not BASIC programs!

You find further details in the manual, Appendix B, descriptions of the @SAVE and @LOAD commands.

You can use the file copy program I published in the other thread about FE3RD to transfer all files from a disk or disk image (for example, 'minigrafik.d64') to the FE3 RAM Disk.

It is also not necessary to change the DN=PEEK(186) assignment. Its purpose is exactly to fetch the last used device number, which will be 13 if you load the slide show program from the RAM disk.
Post Reply