CBM FileBrowser for uIEC SD2IEC MMC2IEC

Discuss anything related to the VIC
User avatar
telengard
Vic 20 Amateur
Posts: 53
Joined: Fri May 28, 2004 11:38 pm

Post by telengard »

nbla000 wrote:Another major update for my CBM-FileBrowser to add Commodore 128 (native mode) support.

CBM FileBrowser v.1.5, download here

Now uppercases disk images D64,D81,D71 are also recognized, C16/Plus4 and C64 versions have the Drive change feature like for C64DTV, C128 and Vic-20 + Mega-Cart.

Many thanks to Hydrophilic for his Commodore 128 (native mode) porting.
Thank you for your continued work on this. Very much appreciated!

~telengard
User avatar
Ghislain
Realms of Quest
Posts: 1279
Joined: Sun Aug 08, 2004 12:54 am

Post by Ghislain »

buzbard wrote:I found a small bug in the CBM Filebrowser. It involves C64s with KERNAL version 2.

Version 2 KERNAL fills the screen color RAM with the current background color (default=blue).
FB64 seems to clear the screen then changes the text color (to white), then when you scroll the file-list part of the text changes to the old (blue) color.
I'm not sure what version of the KERNAL I have on my C64, but FB64 menus have always appeared like this for me, even with the latest version:

Image

Notice where it gets cut off at APPLICATION(S) and MAGAZ(INES)

Thanks.
"A slave is one who waits for someone to come and free him." -- Ezra Pound
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

The directory output of your SD2IEC seems to be a bit non-standard. Could you post a screenshot on the C64, where the same directory is shown with LOAD"$",8 and LIST?

The CBM Filebrowser reads in the directory header and entries, and relies on a certain position of the quotes around the disk and file names.

In case of the disk name, there seems to be an offset of 2 characters, so the quote and an extra space at the end of the disk name also get printed with BSOUT, then you see a RVS OFF, which doesn't work, because BSOUT is in quote mode now. That messes up the rest of the display.

When testing the FE3 RAM disk with FB, I ran into a similar scenario, so Kananga adapted the directory output of the RAM disk to conform more strictly to the layout of the 1541.

I also felt it necessary to 'harden' the directory viewer of MINIPAINT against non-standard directory formats: for one, it mostly throws away all control characters and those PETSCII characters that have no corresponding ASCII code (the text routines internally work in ASCII), furthermore it crops lines exceeding 32 characters - the VDrive of VICE likely produces such over-length lines, which would otherwise lead to a buffer overflow! :shock:
User avatar
Ghislain
Realms of Quest
Posts: 1279
Joined: Sun Aug 08, 2004 12:54 am

Post by Ghislain »

Mike wrote:The directory output of your SD2IEC seems to be a bit non-standard. Could you post a screenshot on the C64, where the same directory is shown with LOAD"$",8 and LIST?

The CBM Filebrowser reads in the directory header and entries, and relies on a certain position of the quotes around the disk and file names.

In case of the disk name, there seems to be an offset of 2 characters, so the quote and an extra space at the end of the disk name also get printed with BSOUT, then you see a RVS OFF, which doesn't work, because BSOUT is in quote mode now. That messes up the rest of the display.

When testing the FE3 RAM disk with FB, I ran into a similar scenario, so Kananga adapted the directory output of the RAM disk to conform more strictly to the layout of the 1541.

I also felt it necessary to 'harden' the directory viewer of MINIPAINT against non-standard directory formats: for one, it mostly throws away all control characters and those PETSCII characters that have no corresponding ASCII code (the text routines internally work in ASCII), furthermore it crops lines exceeding 32 characters - the VDrive of VICE likely produces such over-length lines, which would otherwise lead to a buffer overflow! :shock:
The directory looks fine with LOAD"$",8 and LIST.

I would have to film a video to show what is going on, it's as if the color codes in the COLOR RAM are off and uneven (KERNAL?) because if I scroll up and down, I can see the other letters.

I've no such problem with FileBrowser on the VIC-20.

Thanks!
Last edited by Ghislain on Sat Mar 16, 2013 5:39 pm, edited 1 time in total.
"A slave is one who waits for someone to come and free him." -- Ezra Pound
User avatar
Ghislain
Realms of Quest
Posts: 1279
Joined: Sun Aug 08, 2004 12:54 am

Post by Ghislain »

Here's the screenshot of the directory with LOAD"$",8 and LIST (from real C64):

Image
"A slave is one who waits for someone to come and free him." -- Ezra Pound
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

Ghislain wrote:The directory looks fine with LOAD"$",8 and LIST.
I didn't ask whether it 'looks fine'. The question was whether there might be a two characters offset in the header line of the directory, the output of your SD2IEC compared with the output of a 1541.

To be more explicit: the header line of the 1541 looks like this:

Code: Select all

0 "DISK NAME       " DN 2A
The 0 and the space after this are in normal (i.e. non-inverted) video.

Everything after this is printed in inverse video, there is a quote, and the directory name is exactly 16 characters long, another quote, blank, 2 character disk ID, blank, 2 character DOS ID.

If any of these are different with your SD2IEC, chances are that FB can't handle this.

Edit: I wrote this post as you posted the second screenshot. :)

O.K. then, both screenshots show, that the two characters 'C' and '6' are missing at the beginning of the disk name, and the quote is not supposed to appear in the disk name display in FB. Otherwise the second screenshot indeed shows no anomalies. :?

I have an idea how to investigate this further, but I have to look into the sources of FB first - that'll have to wait till next morning. It's 1 a.m. here now, good night! ;)
User avatar
buzbard
Vic 20 Devotee
Posts: 213
Joined: Sun Jul 03, 2005 9:10 am

Post by buzbard »

Does the display look like that when you're in a d64 or is it only from the SD card?

Do you have another SD card? If so try it in the sd2iec and see if you get the same thing.

The first image you posted doesn't look like the Kernal V2 problem.

You can easily tell which Kernal version you have. When you start the C64 just type: POKE1024,0 and press enter.
If you see a white "@" symbol in the top left corner of the screen you have V1.
If you see nothing, you have V2.
If you see a blue "@" symbol you have V3.
Ray..
User avatar
Ghislain
Realms of Quest
Posts: 1279
Joined: Sun Aug 08, 2004 12:54 am

Post by Ghislain »

I forgot to mention that I load FB64 using the SJLOAD trick--I've been using that for so long with my SD2IEC card that I don't think about it anymore. This issue doesn't occur if I don't use the LOAD"!*FB64@,8,1 trick to make it work faster. This is documented on the web here:

http://chipflip.wordpress.com/2012/01/18/uiec/

Here's a youtube video about it (I didn't make this video):

http://www.youtube.com/watch?v=421mb6alv1M

I can confirm however, that I do have KERNAL 2, so wherever there is normally light blue text with the KERNAL 2 issue that was described earlier, it just appears as black (on a black background, hence it is invisible) with the SJLOAD being loaded prior to it. The text appears as light blue if I don't pre-load SJLOAD.

The directory listing in the Youtube video appears uniformly in reverse, so there is no missing characters--presumably, they're not using KERNAL 2.


EDIT : The easiest way to fix this I think would be to simply fill the COLOR RAM with 1s to take the KERNAL 2 into account. Outside of FB64, I often find myself loading a game on the C64 and the screen is black because somebody put in a trainer asking you to select some options without filling the COLOR RAM. For everybody else, (KERNAL 1 and 3) they can see the text, but KERNAL 2 users cannot.

Obviously, the 2 character offset at the top of the screen along with the reverse characters is being caused by pre-loading the SJLOAD, which is separate from the KERNAL 2 issue.
"A slave is one who waits for someone to come and free him." -- Ezra Pound
User avatar
Ghislain
Realms of Quest
Posts: 1279
Joined: Sun Aug 08, 2004 12:54 am

Post by Ghislain »

I recompiled SJLOAD (source code here http://picobay.com/dtv_wiki/index.php?t ... SJLOAD.ASM ) so that it would boot with a white screen (instead of booting with a black screen) and the result now is that there are no more invisible characters (with my KERNAL 2 C64) when I preload that with FB64.

There is still the problem of the reverse characters and the 2 missing characters of the directory name, but at least I can now see the full text of the files and directories when I use FB64 within that context.

I wonder if CBM Filebrowser could implement SJLOAD within it? Considering that SD2IEC is "Jiffy" speed capable, that might be a pretty good thing to have this fast loader being a part of FB.
"A slave is one who waits for someone to come and free him." -- Ezra Pound
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

I'm glad you found out what was the culprit in case of the 2-character offset.

Regards the initialisation problem of the colour RAM, hoping that nbla000 takes a look:

You can do a common version for both V2 and V3 KERNALs with this trick: instead of just calling JSR CLEARSCREEN, do

Code: Select all

 LDA $D021
 PHA             ; push current background colour on stack
 LDA $0286
 STA $D021       ; temporarily set background the same as foreground
 JSR CLEARSCREEN
 PLA
 STA $D021       ; restore old background colour
That will work on both versions.

V1 still will initialise to white foreground, but then, this version has also a lot of other bugs and I'd suggest anyone who happens to have that version to change it to V3.
User avatar
nbla000
Salmon Run
Posts: 2582
Joined: Thu Oct 13, 2005 8:58 am
Location: Italy

Post by nbla000 »

Another update for my CBM-FileBrowser to add TAP files support by using C64-SD+ITS Module

CBM FileBrowser v.1.6, download here

TAP files work with all supported machines except C64-DTV due to technical limitations of course.
It was tested with C16, C128, Vic-20 (all memory configuration and with Mega-Cart), and C64 (about 400 tap files tested for C64!)

For the Vic-20 without Mega-Cart you may load TAP files of programs that use the current memory configuration, for example if you want to load a TAP files of a games for Vic+3K, you must use the 3k expansion and the FB20-3K program, same for unexpanded or 8K programs.

For the Vic-20 + Mega-Cart, when you select a TAP file, it asks for the memory configuration that you want to use then it loads the file.

Now the browser is fully case insensitive, you may put files like "file.tAp" or "file.DNp" on your SD Card and it will recognize them.

About SJLOAD support for C64, I will add it on my todo list, I'm sorry but as you probably noticed, I'm really busy at the moment.
Mega-Cart: the cartridge you plug in once and for all.
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

I tried your menu on my new SD2IEC for the first time today. The vic-20 (8k) version doesn't seem to set the device to the faster vic-20 speed (open15,8,15,"ui-":close15)...?
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
User avatar
Witzo
Vic 20 Afficionado
Posts: 381
Joined: Thu Dec 01, 2011 9:14 am
Location: The Hague

Post by Witzo »

Thanks for the new version, nbla000!
User avatar
joshuadenmark
Big Mover
Posts: 1217
Joined: Sat Oct 23, 2010 11:32 am
Location: Fr-Havn, Denmark
Occupation: Service engineer

Post by joshuadenmark »

Kind regards, Peter.
____________________________________________________
In need of a wiki logon - PM me
User avatar
nbla000
Salmon Run
Posts: 2582
Joined: Thu Oct 13, 2005 8:58 am
Location: Italy

Post by nbla000 »

Boray wrote:The vic-20 (8k) version doesn't seem to set the device to the faster vic-20 speed (open15,8,15,"ui-":close15)...?
From sd2iec firmware readme:
- UI+/UI-
Switching the slightly faster bus protocol for the VC20 on and off works,
it hasn't been tested much though.
I prefer to leave standard protocol, much more tested, if you want really speed-up your sd2iec based drive, use SJLOAD.

PS: I've fixed all Vic-20 versions for better TAP compatibility, please download the new 1.6 version from the CBM-FileBrowser page.
Mega-Cart: the cartridge you plug in once and for all.
Post Reply