Working with 3k

Basic and Machine Language

Moderator: Moderators

User avatar
ral-clan
plays wooden flutes
Posts: 3702
Joined: Thu Jan 26, 2006 2:01 pm
Location: Canada

Post by ral-clan »

I have a 3K expansion. I like the idea of the 3K expansion not changing any POKES, etc. Too bad it wasn't more of a standard.
PaulQ
undead vic
Posts: 1967
Joined: Sun Jan 14, 2007 2:57 pm

Post by PaulQ »

ral-clan wrote:I have a 3K expansion. I like the idea of the 3K expansion not changing any POKES, etc. Too bad it wasn't more of a standard.
I do too, but I like arrays a lot more. It's too bad they didn't release a "Vic 20+" that included the extra 8k of RAM standard with all the memory maps readdressed.
User avatar
Jeff-20
Denial Founder
Posts: 5761
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

Not changing the POKEs is why I chose 3k. If I use 8k, I'd feel forced to use all of the 8k, and my idea just isn't that big. Maybe the next game will be 8k.

I'm trying to make it flexible so that a half K is not used and Super Expander cart owners could run it too... When you say the 3k is less common are you guys also considering the Super Expander cart?
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

That's the impression I have. People bought that 8K expansion to be able to play all those piracy cartridge images...
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Of course, one major problem with 8K or more is where to store your custom characters. Often you would load the program in two parts, of which the first one relocates start of Basic further forward in memory to give room for custom characters. It can be solved in other, even more technically advanced ways (which has been proven on this forum), but I admit it is a PITA compared to how you can load custom characters at the end of RAM and simply lower RAMTOP when you work with unexpanded or +3K expanded VIC.

If you make your program in two parts, it is rather simple to get it to run in both +3K and +8K. Just configure the 8K expanded machine such as it was unexpanded and put your Basic program starting in block 1 (8192).
Anders Carlsson

Image Image Image Image Image
User avatar
Jeff-20
Denial Founder
Posts: 5761
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

Now I am really torn. I like the 3k game I am now making, but it is... expanded memory. So much of my style has relied on the simplicity of unexpanded basic. I feel like I am cheating. I could just "slim it down" to a smaller game or make a two part game...

I am starting to feel that people would prefer not to plug in extra memory to play a game... I know I didn't really care for 3k tape games. If I have to plug a cart in, my expectations go up.
PaulQ
undead vic
Posts: 1967
Joined: Sun Jan 14, 2007 2:57 pm

Post by PaulQ »

In retrospect, I see the unexpanded Vic as being geared towards the video game console crowd who might want to dabble in some basic BASIC programming; the 3k expansion cart for developers wanting to design games specifically for an unexpanded Vic (the extra headroom necessary at the prototyping stage), and the 8k+ expansion memory carts for the rest of us who are more serious about programming and wished to use our Vic's for something more sophisticated.

I finished writing a Sudoku game in unexpanded BASIC, and it was tough. I will upload it once I manage to get the file into my PC somehow. I can't wait to get an 8k cart to program a Vic version of Sudoku the way I really want it to be.
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

Jeff, that's no problem! People are plugging/unplugging carts all the time... When I just had the 16K switchable cart... hmmm... There was a lot of unpugging, setting switches, pluging it back in all the time...
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

If there is a natural break in your game, why not make it load in two parts? You could even maintain two versions of it, one multi loading for unexpanded users and one that loads everything in one go if you have memory expansion connected. There was a VIC-20 text adventure called "Mad Man" (written by a Swedish guy) that either loaded 16K in one go, or loaded in several parts if you ran it on unexpanded VIC.
Anders Carlsson

Image Image Image Image Image
User avatar
ral-clan
plays wooden flutes
Posts: 3702
Joined: Thu Jan 26, 2006 2:01 pm
Location: Canada

Post by ral-clan »

I am totally naive, but provided that a game is under 6K total, is the only difference between a 3K expanded game and an 8K expanded game the POKE values?

If so, couldn't you just write a header on the game that asks the user what type of expansion is plugged in, and then sets the POKES to match the expansion cartridge into variables?

i.e.

in the program all the POKES for screen & colour locations are written as variables i.e. POKE SC,53: POKE CL,8

and then program would punch in the proper POKE code (i.e. 36879) if to make it either run correctly in 3K or 8/16K....

is there some reason this wouldn't work?
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

ral-clan, If you have user defined graphics, you have to put them "in front" of the basic memory in 8K+ because the vic chip only sees the internal ram.
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
User avatar
ral-clan
plays wooden flutes
Posts: 3702
Joined: Thu Jan 26, 2006 2:01 pm
Location: Canada

Post by ral-clan »

Okay thanks for clearing that up!
Alan
Vic 20 Devotee
Posts: 280
Joined: Wed Mar 24, 2004 11:20 am

Post by Alan »

ral-clan wrote:I am totally naive, but provided that a game is under 6K total, is the only difference between a 3K expanded game and an 8K expanded game the POKE values?

If so, couldn't you just write a header on the game that asks the user what type of expansion is plugged in, and then sets the POKES to match the expansion cartridge into variables?
I used to have a cardco slot expander cart with documentation that included a handy 1 line BASIC program. Include that line at the beginning of your program and it will correctly define Screen and Color memory regardless of the users RAM configuration. As others have mentioned, this doesn't solve the problem with user-defined characters, but it's still pretty handy.

I'm at work now, but if someone would like that posted I can do it later.
Alan
User avatar
Jeff-20
Denial Founder
Posts: 5761
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

8k is not an option despite the proliferation of carts. The user graphic issue is too much for me. I've considered multi-load programs, but... I would like to have a larger "game engine". If I just wanted more levels or more options, multi-load would be the solution. However, I would like the "main loop" to include more functions. To illustrate, compare Space Invaders to Galaga (Galaga having more functions in the main loop with the diving aliens and all...)

I've decided to create two slim programs. Seperating them is a disappointing necessity. I have a 3k functioning version now, but I just don't think the added features make it worthy of plugging in another accessory (joystick, tape, ...and cart?). :cry:
User avatar
Mike
Herr VC
Posts: 4849
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

How many self defined characters do you need?

With 8K it is still possible to put a small number of them into addresses 680..767 (chars 85 to 95), and 832..1023 (chars 104 to 127). That are 35 characters. You then issue POKE 36869,200 to activate these characters, and keep the screen at 4096.

Michael
Post Reply