SD2IEC for VIC-20

Modding and Technical Issues

Moderator: Moderators

paulmil18
Vic 20 Newbie
Posts: 18
Joined: Sat Apr 07, 2018 2:20 pm

SD2IEC for VIC-20

Post by paulmil18 »

Greetings Everyone,

I recently purchased an SD2IEC unit for the VIC-20 to SAVE my programs from my old tapes. I LOAD the program from the tape into the VIC-20 and then SAVE to the SD card (using an 8Gig SanDisc SD Card). I'm using separate cards for unexpanded programs and ones that require the 8K expansion.

I'm noticing that some of the programs (unexpanded and 8K) LOAD fine from tape, but when saving to the SD2IEC, the program is truncated. Usually about half of the program is missing. I don't RUN the program before the SAVE. I have LISTed it to make sure it's all there, and when I LOAD back from the SD card, half still disappears.

I tried LOADing from the tape and running, and they work fine. I can't figure out why the SAVE to the SD card is having such an issue. Pretty much all of these programs are typed in manually from the 1982-1985 issues of Compute! Magazine.

Anyone have some suggestions, or have seen this issue before?

Thanks everyone!!

Paul
groepaz
Vic 20 Scientist
Posts: 1191
Joined: Wed Aug 25, 2010 5:30 pm

Re: SD2IEC for VIC-20

Post by groepaz »

just guessing... did you set up the memory correctly for those programs, ie +8k when loading a program that needs it, and unexpanded for programs that run on unexpanded?

i'd just use a simple copy program written in BASIC - the 1541 demo disk for example should have one that works on vic20 too
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
paulmil18
Vic 20 Newbie
Posts: 18
Joined: Sat Apr 07, 2018 2:20 pm

Re: SD2IEC for VIC-20

Post by paulmil18 »

I believe so. I LOAD them from tape with the proper expansion module (or none in the case of the unexpanded programs) and then immediately SAVE to the SD card. Still only some of them get truncated. I wonder if it has to do with the SD card being 8Gig?
groepaz
Vic 20 Scientist
Posts: 1191
Joined: Wed Aug 25, 2010 5:30 pm

Re: SD2IEC for VIC-20

Post by groepaz »

that would be surprising if the size of the sd card mattered
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
paulmil18
Vic 20 Newbie
Posts: 18
Joined: Sat Apr 07, 2018 2:20 pm

Re: SD2IEC for VIC-20

Post by paulmil18 »

Ok, so I've been doing some experimenting with different SD cards, just to rule out that the card could not be an issue. Sadly, it seems the type or style of card MAY actually be the issue preventing a successful SAVE from the VIC-20. Here is a list of the cards I've tried, all formatted in Windows 7 to FAT 32:

Crucial - 2GB

SanDisc(HC I) - 8GB (two different versions)

PNY micro (with adapter--NC I) - 16GB

Toshiba (HC) - 4 GB----This one actually works (so far)

I've attached a photo of the SD cards, and ask everyone if you wouldn't mind letting me know what you use to SAVE from the VIC-20. Saving a downloaded PRG in Windows works all the time on all cards. It's just that whole SAVE from the VIC-20 that is kind of screwy.

Thanks again for everyone looking at this one!

Paul
Attachments
CIMG4469.JPG
CIMG4468.JPG
groepaz
Vic 20 Scientist
Posts: 1191
Joined: Wed Aug 25, 2010 5:30 pm

Re: SD2IEC for VIC-20

Post by groepaz »

SD cards problems are usually "all or nothing"... ie a card that initialises correctly will also work for read/write.

however, different cards draw different amount of power - it *may* be a power issue.

another problem with some SD2IEC that are being sold are missing ground connections at the IEC cable... you should check that.

i'd try saving the same file a dozen times, and then compare - when you get different files on the card, then it kinda hints on bad IEC connection.

and did you update to the most recent firmware? thats also worth a try.
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
paulmil18
Vic 20 Newbie
Posts: 18
Joined: Sat Apr 07, 2018 2:20 pm

Re: SD2IEC for VIC-20

Post by paulmil18 »

Ok, I've tried a few more experiments...saving under different names...long names, short names, multiple times adding a 1 or 2 at the end...

What I've found is that I got lucky once with an 8K game called Caves of Ice. It LOADed from tape and saved to the SD card once (the Toshiba (HC) - 4 GB). If I LOAD it from the SD card, it will save to any other card correctly. If I LOAD it from tape, still only a part of the program saves, and it's always the same stopping point.

As many of you can tell, I am as new as it gets. The SD2IEC didn't come with instructions, so I don't know how to update the Firmware. I've attached some images of what I have. Anyone out there know much about this one? I'm not even sure what the buttons on the front are for.

Sorry about the ignorance...but, ya gotta start somewhere...

Thank!

Paul
Attachments
CIMG4473.JPG
CIMG4472.JPG
CIMG4471.JPG
CIMG4470.JPG
User avatar
orion70
VICtalian
Posts: 4341
Joined: Thu Feb 02, 2006 4:45 am
Location: Piacenza, Italy
Occupation: Biologist

Re: SD2IEC for VIC-20

Post by orion70 »

Nice device! Neat design, too :). I wonder why they often sell this stuff with no info or instructions whatsoever. As for SD cards, I bought a lot of five in Ebay, all 256Mb, which is a good size for the VIC (and other Commodore 8 bits). Format it FAT16 or FAT32 et voila, you have your 1541 ready to go. Installing a new firmware should be just as easy as download it, put it* in the root directory, and reboot.

You can find plenty of information in the wiki pages:
https://www.c64-wiki.com/wiki/SD2IEC [general info]
https://www.c64-wiki.com/wiki/sd2iec_(firmware) [functionality and commands]

* just unzip sd2iec-current-binaries.zip. Power on the device and watch the lights flash for a while. Now you can remove the files.
groepaz
Vic 20 Scientist
Posts: 1191
Joined: Wed Aug 25, 2010 5:30 pm

Re: SD2IEC for VIC-20

Post by groepaz »

also, before you update, powercycle the device, then type/run this small program:

0 open 15,8,15
1 input a,b$,c,d
2 print a,b$,c,d
3 close 15

(powercycling is important, else you will only see 0, ok, 0, 0)

then it will tell you the current firmware version
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
paulmil18
Vic 20 Newbie
Posts: 18
Joined: Sat Apr 07, 2018 2:20 pm

Re: SD2IEC for VIC-20

Post by paulmil18 »

Thanks for the tips and advice. Some more newbie questions:

Groepaz: What does that me to "powercycle"? I have tried turning the VIC-20 on and off, and there is not really a power switch for the SD2IEC (unless you mean to unplug the power cord and then plug back in?).

Orien70: After I load the firmware updates onto an SD card, how do I make it work in the unit itself?

Thanks all!

Don
groepaz
Vic 20 Scientist
Posts: 1191
Joined: Wed Aug 25, 2010 5:30 pm

Re: SD2IEC for VIC-20

Post by groepaz »

powercycle= turn it off and on again :) actually what really matters is that you run this program right after the device was reset (some SD2IEC have a reset button too, so pressing that would do the trick as well). when it gets the power from the vic20, just turning on the vic20 and then entering/running that program will work fine
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
paulmil18
Vic 20 Newbie
Posts: 18
Joined: Sat Apr 07, 2018 2:20 pm

Re: SD2IEC for VIC-20

Post by paulmil18 »

Ok...that's what I thought, but when I did it and entered the program, I wasn't sure what to input at the ? prompt, so I just pressed enter and received the 0 0 0 message you mentioned. Should I be entering anything for the INPUT command prompt?

Thanks! I'm getting there with baby steps and truly appreciate all the assistance.

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

Re: SD2IEC for VIC-20

Post by Mike »

Line 1 has a small bug, and the correct program should read:

Code: Select all

0 open 15,8,15
1 input#15,a,b$,c,d
2 print a,b$,c,d
3 close 15
Alternatively, try this one-liner:

Code: Select all

1 OPEN15,8,15:FORP=-1TO0:GET#15,A$:PRINTA$;:P=ST=0:NEXT:CLOSE15
and RUN.
paulmil18
Vic 20 Newbie
Posts: 18
Joined: Sat Apr 07, 2018 2:20 pm

Re: SD2IEC for VIC-20

Post by paulmil18 »

Excellent...I'll give that a try.

Any chance you know what kind of screen response I should be looking for? I downloaded the firmware update from the earlier post to an SD card and it contains several .BIN files and on .HEX file. What's the best way to use make these work should the firmware require the update?

Thanks!

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

Re: SD2IEC for VIC-20

Post by Mike »

paulmil18 wrote:Any chance you know what kind of screen response I should be looking for?
With my one-liner, something that reads like this:

73, ... SD2IEC ...,00,00

... with something before and after the SD2IEC caption. Please quote the full string. It's the start-up message of the SD2IEC, and includes valuable info from its version number.

The same program can also be used to read the start-up message from CBM disk drives, and otherwise reads out the error message if you see a blinking drive LED after a disk operation. If nothing went wrong, you see a "00, OK,00,00" message.
What's the best way to use make these work should the firmware require the update?
As orion70 already wrote, normally you'd put the current collection of sd2iec.bin files into the root directory of your SD card, insert it into your SD2IEC while it and your VIC-20 are powered off, switch on VIC-20 (and SD2IEC), and then *wait* roughly 30 seconds before using it.

A fully functional SD2IEC contains a so-called boot loader, which automatically checks for a newer firmware (those *.bin files) and, when present, flashes a compatible firmware into the flash ROM of the microcontroller of the SD2IEC. The boot loader is able to pick the correct *.bin file from that collection.

Sometimes, SD2IEC devices are sold without such a boot loader. Those can't be upgraded, and are considered defective by the maintainer of the sd2iec firmware, Ingo Korb.

Before upgrading though, please provide the info what version of the sd2iec firmware is currently installed.
Post Reply