Jump to content
IGNORED

VIC 20 SD2IEC help- Possible memory error?


Recommended Posts

Hi, I just bought an SD2IEC for my vic 20 that I recently bought to play "blitz"!

 

I have a 16GB memory expansion card for the vic, and a ms paceman cartridge.

 

I download the SD card starter pack from thefuturewas8bit

 

When I executed the following command

 

LOAD”FB",8<return>

RUN

 

It loads the CBM file browser (the black 8k one) and I am able to navigate and select games. Unfortunately, for most of the ones I tried, it loads them (green lights flash) then it goes back to basic

 

I removed the memory expansion card and some of the games that didn't run before ran (e.g. alien blitz) but a lot didn't run

 

I also tried renaming some of the files so they are all in lowercase and <8 characters, but that didn't really help.

 

1- Any ideas how to debug?

 

2- How can I test my memory expansion card? Is there a SW or a HW test I can do?

 

3- How can I convert my favorite game from a .TAP format to a .PRG file (Blitz). I tried using tapclean-0.34-OSX but despite fixing the tape first (which ran fine on Vice) it will not produce an output file. No error messages nothing.

 

THANKS!

Edited by juan9999
Link to comment
Share on other sites

When you add 8 kilobytes or more (I strongly doubt you've got a 16 gigabyte memory expansion, I'll chalk that down as a typo), a number of locations are shifted around in memory. It basically means VIC-20 games can be divided into these categories:

 

Unexpanded games - must be loaded without any memory expansion

3K expanded games - must be loaded with the 3K expansion, not any larger expansion

8K and upwards games - must be loaded with the required memory, usually 8K or 16K

 

The 16K is a superset of the 8K so it works with 8K games as well.

 

Then you have cartridge dumps. These need to be loaded into very particular memory locations, which you may or may not be able to obtain:

 

8K cartridge dumps load into block 5, hexadecimal address $A000. This is a RAM/ROM slot not accessible by BASIC.

16K cartridge dumps load one half into block 5 and the second half into either block 3 ($6000) or on rare occasions block 1 ($2000) or 2 ($4000).

 

If your 16K expansion is a standard one, it maps to blocks 1 and 2. Many, but not all of these can be modded to become switchable meaning that for each block of 8K you can map it to either of the blocks 1, 2, 3 or 5 in the memory map. If it is not switchable, you can pretty much forget loading cartridge dumps. With the great supply and variety of modern, inexpensive VIC-20 memory expansions, these days you should only pick up a standard 16K one if you're a collector or it has been modified IMHO.

 

Thus if you download some programs made to load from e.g. tape (PRG) and requlre 8-16K, you should be able to load and run those. Please note that the file browser FB comes precompiled for the different memory configurations, so with the expansion you would load one version of the browser and without it you would load a different one.

 

While I didn't answer question 1, I think what I write above will make sense. As for question 2, how to test your memory expansion:

 

10 FOR I=8192 TO 24575

15 POKE I,170:IF PEEK(I)<>170 THEN PRINT"ERROR #170 - ";I

20 POKE I,85:IF PEEK(I)<>85 THEN PRINT"ERROR #85 - ";I

25 NEXT

 

It will take a good while to run, but will test every single memory address in the 16K expansion span. First it stores 170 which binary is 10101010 and reads it back to verify. Then to be entirely sure, it stores 85 which is binary 01010101 and reads it back. The second step probably is not really required, it depends on how thorough you are.

 

On question 3, I think a command line program like cbmconvert is capable of extracting the data from a TAP to a PRG. There may be GUI tools that handle it too. This may sometimes be a bit tricky, so practise is expected. If I have the time later, I can be more verbose on the process.

  • Like 2
Link to comment
Share on other sites

When you add 8 kilobytes or more (I strongly doubt you've got a 16 gigabyte memory expansion, I'll chalk that down as a typo), a number of locations are shifted around in memory. It basically means VIC-20 games can be divided into these categories:

 

Unexpanded games - must be loaded without any memory expansion

3K expanded games - must be loaded with the 3K expansion, not any larger expansion

8K and upwards games - must be loaded with the required memory, usually 8K or 16K

 

The 16K is a superset of the 8K so it works with 8K games as well.

 

Then you have cartridge dumps. These need to be loaded into very particular memory locations, which you may or may not be able to obtain:

 

8K cartridge dumps load into block 5, hexadecimal address $A000. This is a RAM/ROM slot not accessible by BASIC.

16K cartridge dumps load one half into block 5 and the second half into either block 3 ($6000) or on rare occasions block 1 ($2000) or 2 ($4000).

 

If your 16K expansion is a standard one, it maps to blocks 1 and 2. Many, but not all of these can be modded to become switchable meaning that for each block of 8K you can map it to either of the blocks 1, 2, 3 or 5 in the memory map. If it is not switchable, you can pretty much forget loading cartridge dumps. With the great supply and variety of modern, inexpensive VIC-20 memory expansions, these days you should only pick up a standard 16K one if you're a collector or it has been modified IMHO.

 

Thus if you download some programs made to load from e.g. tape (PRG) and requlre 8-16K, you should be able to load and run those. Please note that the file browser FB comes precompiled for the different memory configurations, so with the expansion you would load one version of the browser and without it you would load a different one.

 

While I didn't answer question 1, I think what I write above will make sense. As for question 2, how to test your memory expansion:

 

10 FOR I=8192 TO 24575

15 POKE I,170:IF PEEK(I)<>170 THEN PRINT"ERROR #170 - ";I

20 POKE I,85:IF PEEK(I)<>85 THEN PRINT"ERROR #85 - ";I

25 NEXT

 

It will take a good while to run, but will test every single memory address in the 16K expansion span. First it stores 170 which binary is 10101010 and reads it back to verify. Then to be entirely sure, it stores 85 which is binary 01010101 and reads it back. The second step probably is not really required, it depends on how thorough you are.

 

On question 3, I think a command line program like cbmconvert is capable of extracting the data from a TAP to a PRG. There may be GUI tools that handle it too. This may sometimes be a bit tricky, so practise is expected. If I have the time later, I can be more verbose on the process.

 

Thanks so much for your time in answering my questions!

 

I have the standard commodore 16k (yes, not gigs lol!) cartridge.

 

Ok, now it makes a lot more sense! My memory from when I was 14 is a little fuzzy haha! To confirm my understanding, if I want to run I tried to run the Ms. Pac-Man-a000 (8k file size) in the games directory of the SD image that I referred to above, I need an 8k or above extension. Unfortunately, it does not work with my 16k.

I ran your program (about 4 minutes or so), and it went back to the ready prompt after a few minutes so I'm assuming no memory errors.

 

I did run this code that I found elsewhere:

 

10 B=1:C=B+48

20 B=B+1:IF B=12 THEN END

30 C=C+1:?"$";CHR$©;"000:";

40 A=B*4096:E=A+4095

50 FOR I = A TO E STEP 256

60 FOR J = 0 TO 255

70 POKE I+J,25

80 IF PEEK(I+J) <> 25 THEN ?"X";:GOTO 110

90 NEXT J

100 ?"O";

110 NEXT I

120 IF B=7 THEN B=9:C=55+B

130 GOTO 20

It seems to get stuck at a loop and display X's (errors) in the $3000 range.

So from the SD image that I downloaded, how do I know which .PRG files require what memory? Do I have to look at the dump file sizes?

The cartridges are labeled based on memory requirement, and I assume will only run with the correct memory configuration. Can cartridge images be executed simply by loading them and running them using the run command or is there another way to do it with SD2IEC?

 

Where is the best place to buy a switchable memory card?

 

Thanks again!

Link to comment
Share on other sites

I believe Ms. Pac-Man is 16K but in any case, it needs to be loaded into the exact right memory block. Your memory expansion probably is OK (I'm too tired to think through what your test program does) but it is hard wired to map into blocks 1 and 2 while any cartridge game at least needs RAM at block 5.

 

PRG files have the property that the very first two bytes is a load address, ordered as low byte, high byte. A few examples:

 

Unexpanded game: $01 $10 (start of BASIC address 4097)

3K expanded: $01 $04 (moved start of BASIC 1025)

8K or 16K expanded: $01 $12 (moved start of BASIC 4609)

$6000 cartridge image: $00 $60

$A000 cartridge image: $00 $A0

etc

 

If you come across a ROM file that has a size that is an exact multiple of 1024 (2048, 4096, 8192), it won't have its start address assigned and then it takes some more disassembly to figure it out, but I think all files you can find are in PRG format with the load address included.

 

Assuming you have a memory expansion that does the job, you would LOAD"CARTRIDGE",8,1 to position it into the correct block, then SYS 64802 to issue a soft reset that will start the game. For a 16K game, you will have to LOAD"CARTRIDGE.6000",8,1 first, then NEW to reset BASIC memory pointers and LOAD"CARTRIDGE.A000",8,1 before you can run it.

 

It might be so that the file browser has built in support for this, it was a while ago I tried it.

 

If you're handy with soldering and don't mind to mod your existing expansion, assuming it is a VIC-1111, you could take it apart. On the PCB there are solder pads to actually set memory blocks. You could install a row of small DIP switches to these pads, make a small hole in the cartridge shell and make the memory expansion switchable so each block of 8K can go into locations block 1, 2, 3, 5.

 

At this point, someone will chime in about the wide range of multicarts, flash carts and memory expansions you can buy today.

 

If you only need a memory expansion and don't want to spend additional money on getting something more advanced, I would recommend this product manufactured by forum member k3ys.

http://www.ebay.com/itm/332273535156

 

There is also Jim Brain's (also forum member) UltiMem at $50 which gives you a whopping 1 MB of RAM (banked), 8 MB of Flash ROM and a lot of options. I'm not sure how much of DIY it is to configure, but in combination with the SD2IEC as a storage/transfer device, you would get a lot out of it in the long run.

http://store.go4retro.com/ultimem-vic-20-memory-expansion-cartridge/

 

There are several others, including the strictly multicart oriented Behr Bonz, the Final Expansion 3 which has both RAM, Flash and SD in one, the Penultimate Expansion which IIRC is similar and a few more projects I can't recall. Of course the more goodies, the more expensive it gets.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...