"Ultimate Expansion" - new firmware for FE3

Basic and Machine Language

Moderator: Moderators

User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

"Ultimate Expansion" - new firmware for FE3

Post by srowe »

I've found my FE3 to be a versatile cartridge, once I worked out its features. There were a couple of enhancements I wanted it to have so I took a look at the source code and, before I knew it, I'd ended up re-writing the firmware.

In my hubris I've named this "Ultimate Expansion", I like to think I've made it a little better.

Changes are summarized below:

New Features
  • Anonymous chain loading
  • Bank-aware machine code monitor
  • Batch cart image flashing
  • Load & run wedge command (↑)
  • RUN/STOP load from disk
Other Improvements
  • Faster entry to BASIC
  • Faster loading from SD2IEC with Zippy
  • More compact cart encoding
  • Various bug fixes
Further information in the documentation.

It has had significant testing within VICE (without which development would have been much more difficult) and a limited amount of testing on a PAL
FE3. I've tried a selection of entries from the FE3 Collection image, fixing problems when I came across them.

I'd like to hear if the NTSC image works with real hardware, or if there are compatibility issues with loader files.

There is still some space left, I'd be interested to hear of any other enhancements people think could be made.

Please treat this as a Beta release, only try it out if you are comfortable with reflashing the FE3 firmware using a standalone program (in case of problems). I would recommend backing up any current cart images (tools provided) and taking a note of your current firmware version first.

Code as usual is available here:

https://eden.mose.org.uk/gitweb/?p=fina ... ;a=summary
Attachments
final-expansion.zip
(37.21 KiB) Downloaded 113 times
Vic20-Ian
Vic 20 Scientist
Posts: 1214
Joined: Sun Aug 24, 2008 1:58 pm

Re: "Ultimate Expansion" - new firmware for FE3

Post by Vic20-Ian »

Well done Simon, quite the achievement.

It is a great cart, I have 2 now, picked up a non working one - someone had switched the DIP switch off ;-)

I will try and find some time to give it a go.
Vic20-Ian

The best things in life are Vic-20

Upgrade all new gadgets and mobiles to 3583 Bytes Free today! Ready
User avatar
chysn
Vic 20 Scientist
Posts: 1205
Joined: Tue Oct 22, 2019 12:36 pm
Website: http://www.beigemaze.com
Location: Michigan, USA
Occupation: Software Dev Manager

Re: "Ultimate Expansion" - new firmware for FE3

Post by chysn »

How do we get the FE3 cart?
User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

Re: "Ultimate Expansion" - new firmware for FE3

Post by srowe »

chysn wrote: Tue Nov 01, 2022 5:18 am How do we get the FE3 cart?
Good question, I don't think anyone is building them at the moment. Everything necessary to do so is here

https://github.com/SkydivinGirl/Final-E ... n-3-Rev-11
User avatar
telengard
Vic 20 Amateur
Posts: 53
Joined: Fri May 28, 2004 11:38 pm

Re: "Ultimate Expansion" - new firmware for FE3

Post by telengard »

Thanks for the firmware updates. Dug out my cart and upgraded it. How exactly does the "batch cart" feature work? Does it use the loader files?

I've never been able to flash carts even with the stock firmware. I have disk images, etc showing up after using mkloader. I had tried making a loader file for my cart dir and using that to flash, but it does nothing. I'm sure I'm doing something wrong. I went over the docs and didn't see exactly how it should be done.
User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

Re: "Ultimate Expansion" - new firmware for FE3

Post by srowe »

telengard wrote: Sat Nov 05, 2022 4:19 pm Thanks for the firmware updates. Dug out my cart and upgraded it. How exactly does the "batch cart" feature work? Does it use the loader files?
I should add an explanation to the docs. Yes, it allows you to flash a whole loader file in one go (rather than one entry at a time with "Flash Program").
I've never been able to flash carts even with the stock firmware. I have disk images, etc showing up after using mkloader. I had tried making a loader file for my cart dir and using that to flash, but it does nothing. I'm sure I'm doing something wrong. I went over the docs and didn't see exactly how it should be done.
Do the entries work using the "Disk Loader" menu? It's easy to get the syntax wrong and I've improved the error detection and reporting a little in my firmware. Which documentation were you using, the original or mine? I've included some simple examples in the release, if you attach your file I can help you debug it.
User avatar
telengard
Vic 20 Amateur
Posts: 53
Joined: Fri May 28, 2004 11:38 pm

Re: "Ultimate Expansion" - new firmware for FE3

Post by telengard »

srowe wrote: Sun Nov 06, 2022 4:11 am
telengard wrote: Sat Nov 05, 2022 4:19 pm Thanks for the firmware updates. Dug out my cart and upgraded it. How exactly does the "batch cart" feature work? Does it use the loader files?
I should add an explanation to the docs. Yes, it allows you to flash a whole loader file in one go (rather than one entry at a time with "Flash Program").

That's good to know, thank you.
srowe wrote: Sun Nov 06, 2022 4:11 am Do the entries work using the "Disk Loader" menu? It's easy to get the syntax wrong and I've improved the error detection and reporting a little in my firmware. Which documentation were you using, the original or mine? I've included some simple examples in the release, if you attach your file I can help you debug it.
Yes, I am able to load disk images via the Disk Loader. When I would choose Flash Program, it just did nothing. The original documentation doesn't (at least I didn't see it) explain how this works. If it is individual carts, should a file chooser be shown?

I have not tried your Batch Cart feature yet, but I will tonight. I guess the other confusing thing is, how can 2 different loaders be present in the same directory at the same time. I have my loader for disk images, but if I put one down for cart, should I rename the disk one temporarily as the cart one will be flashed? (that's what I had tried with flash program, but as mentioned, it did not work).

thank you for the help!
User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

Re: "Ultimate Expansion" - new firmware for FE3

Post by srowe »

telengard wrote: Tue Nov 08, 2022 1:46 pm Yes, I am able to load disk images via the Disk Loader. When I would choose Flash Program, it just did nothing. The original documentation doesn't (at least I didn't see it) explain how this works. If it is individual carts, should a file chooser be shown?
See if my document makes any more sense

https://eden.mose.org.uk/download/FE3%2 ... 0Guide.pdf
I have not tried your Batch Cart feature yet, but I will tonight. I guess the other confusing thing is, how can 2 different loaders be present in the same directory at the same time. I have my loader for disk images, but if I put one down for cart, should I rename the disk one temporarily as the cart one will be flashed? (that's what I had tried with flash program, but as mentioned, it did not work).

thank you for the help!
I'm confused with your statement about two different loaders, what other format are you using?

Both the original firmware and mine behave in this way:
  1. You create a LOADER file with the memory config, list of files and execution action for one or more programs
  2. You go to 'FE3 Utilities' > 'Flash Program'
  3. The list of entries in the LOADER file is displayed
  4. You select an entry and hit [RETURN], the entry is written to flash
  5. Return to the main menu, select 'Cart Loader'
  6. The entry in 4. is shown, hit [RETURN] and it is launched
There's a set of simple examples in a .D64 in the zipfile. Try them out, let me know if you'd rather have them extracted so you can copy them to an SD card.
User avatar
telengard
Vic 20 Amateur
Posts: 53
Joined: Fri May 28, 2004 11:38 pm

Re: "Ultimate Expansion" - new firmware for FE3

Post by telengard »

Sorry for the confusion, by the 2 LOADER files, I was assuming (since I haven't seen how the cart loading works yet for any firmware version) that you used a LOADER file with disk images, etc for the Disk Loader (and those LOADER files seem to have to stay on the SD card), and was wondering how you would put an additional LOADER on the SD card for loading carts since there is no LOADER file chooser.

If I'm understanding you right, I'd just have the 1 LOADER with everything in it, and I pick and choose carts in that list to put into flash. Is that correct?
Looking at your new doc, it does seem to be that's how it works.

I'm going to try flashing some carts in a little bit.
User avatar
telengard
Vic 20 Amateur
Posts: 53
Joined: Fri May 28, 2004 11:38 pm

Re: "Ultimate Expansion" - new firmware for FE3

Post by telengard »

I was able to get choices with the "Flash Program" option, but not the batch. Here is the petcat'ed output of my top level loader and then then other folder it points to:

Code: Select all

;loader ==1201==
  100 "fe3/"
  110 +@"cd:fe3"
  120 +reload

Code: Select all

;loader ==0801==
   10 "<Game Carts>"
   12 +@"cd:carts"
   14 +reload
   16 "<Tape-to-Disk>"
   18 +@"cd:ttd"
   20 +reload
   22 "<Infocom>"
   24 +@"cd:infocom"
   26 +reload
   28 "<Games>"
   30 +@"cd:games"
   32 +reload
   34 "<Demos>"
   36 +@"cd:demos"
   38 +reload
   40 "<Utilities>"
   42 +@"cd:utils"
   44 +reload
These also show up in the Disk menu, and I can run files from the entries.
User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

Re: "Ultimate Expansion" - new firmware for FE3

Post by srowe »

These loader file only contain DOS commands and menu reload actions, they can't be written to flash. The batch loader skips entries like this, to flash entries with actual content currently requires you to use either the 'Flash Program' or 'Disk Loader' menus to traverse the SD card first. I'll have a think about how this could be improved.
User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

Re: "Ultimate Expansion" - new firmware for FE3

Post by srowe »

telengard wrote: Tue Nov 08, 2022 9:03 pm If I'm understanding you right, I'd just have the 1 LOADER with everything in it, and I pick and choose carts in that list to put into flash. Is that correct?
Looking at your new doc, it does seem to be that's how it works.
Yes, the same LOADER file can be used to either load and run an entry immediately (using the 'Disk Loader' menu) or the programs contained in an entry can be written to flash (using the 'Cart Flasher' menu) for running later (with the 'Cart Loader' menu).

The commands in an entry are processed differently when flashing to the cart. DOS commands (@"...") are acted immediately on when reading the entry so that you can do something like

Code: Select all

106 "Quikman+8K"
108 +blkd0,2,3,5
110 +@"cd:rhurst-vic20.d64"
112 +"quikman+8k",b
114 +run
and the loader routine can then copy the payload files to flash.

If an entry contains RELOAD this indicates that the purpose of the entry is just to navigate the directory tree, not to actually execute or flash anything. Something like

Code: Select all

100 "Strange Example"
110 +"program",b
120 +reload
is meaningless.
User avatar
telengard
Vic 20 Amateur
Posts: 53
Joined: Fri May 28, 2004 11:38 pm

Re: "Ultimate Expansion" - new firmware for FE3

Post by telengard »

srowe wrote: Wed Nov 09, 2022 1:47 am These loader file only contain DOS commands and menu reload actions, they can't be written to flash. The batch loader skips entries like this, to flash entries with actual content currently requires you to use either the 'Flash Program' or 'Disk Loader' menus to traverse the SD card first. I'll have a think about how this could be improved.
I should have mentioned that the directories pointed to have files in them, including the "Carts" directory. With the other 2 programs, I can traverse to files.

Should I just make a separate loader file for the cart images and temporarily stage that in the root and do a batch import? I'm assuming that will work as the files are written to flash and the location on the SD card doesn't matter.
User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

Re: "Ultimate Expansion" - new firmware for FE3

Post by srowe »

telengard wrote: Wed Nov 09, 2022 8:02 pm Should I just make a separate loader file for the cart images and temporarily stage that in the root and do a batch import? I'm assuming that will work as the files are written to flash and the location on the SD card doesn't matter.
It's non-trivial to implement a recursive batch loader that can navigate into subdirectories (or disk images) automatically. If an entry does a @"CD:.." but doesn't reverse it the drive will be in the wrong directory when it moves to the next entry.

If you want to flash the entire contents of, say the FE3 Collection, you would need to move all entries into one loader file and unpack payloads from any .D64 images. For just the carts directory most entries only refer to files in that directory (except K-Star Patrol).
User avatar
telengard
Vic 20 Amateur
Posts: 53
Joined: Fri May 28, 2004 11:38 pm

Re: "Ultimate Expansion" - new firmware for FE3

Post by telengard »

Totally understand that being difficult. I will create a separate LOADER for just the carts in the top level dir.

thanks for your help!
Post Reply