Programmer's Aid cart Block 5

Basic and Machine Language

Moderator: Moderators

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

Post by Jeff-20 »

Why doesn't our wiki have a list of commands for the cart? I have never used mine because I don't really know how.
High Scores, Links, and Jeff's Basic Games page.
wimoos
Vic 20 Afficionado
Posts: 345
Joined: Tue Apr 14, 2009 8:15 am
Website: http://wimbasic.webs.com
Location: Netherlands
Occupation: farmer

Exbasic

Post by wimoos »

Knowing how to move a cart from $7000 to $B000 is very interesting, maybe there is way to automate this ?

Instead of ProgAid, why not use Exbasic. It is already in BLK5, provides for programming and debug tooling, AND enhances Basic with a wealth of extra statements and functions.

Since I found a manual, I became very enthousiastic about this.
Diddl
Vic 20 Afficionado
Posts: 425
Joined: Wed Jun 10, 2009 3:18 am

Post by Diddl »

>Knowing how to move a cart from $7000 to $B000 is very interesting,
>maybe there is way to automate this ?

You can do this with any monitor program using "N" command (new relocator).


>Instead of ProgAid, why not use Exbasic. It is already in BLK5, provides for
>programming and debug tooling, AND enhances Basic with a wealth of
>extra statements and functions.

exbasic ist much bigger than programmers aid and cannot combined with other tools in this manner.
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

Diddl wrote:
wimoos wrote:Knowing how to move a cart from $7000 to $B000 is very interesting,
maybe there is way to automate this ?
You can do this with any monitor program using "N" command (new relocator).
I've dug far enough into the code that I can say you're most probably wrong with this assertion. While it might be easy to relocate jumps, there are some obstacles more in PA (and other similar 65xx programs):

- It contains two tables with low-bytes, and high-bytes of jump addresses into itself. These are pushed on the stack, and popped via RTS, so actually contain the addresses - 1,
- There is a sub-routine which copies a pair of ZP addresses. The JSR's to it are followed by two data bytes, which could easily be mistaken for normal instructions,
- There is a vector diverted via LDA #low_byte:STA low_byte_of_vector:LDA #high_byte:STA high_byte_of_vector. How could an automatic relocator know, that low_byte/high_byte indeed form an address inside the program, and are not some other initialisation?

So, an automatic relocator would, except in very simple cases, turn the original code into a pile of junk.

Try it yourself, with a relocator you deem capable of the task. And then make a binary diff to my relocated version.
User avatar
Pedro Lambrini
Vic 20 Scientist
Posts: 1132
Joined: Mon Dec 01, 2008 11:36 am

Post by Pedro Lambrini »

carlsson wrote:Does the Programmers' Aid contain any commands you can use within a program? I thought it mostly contains programming tools like renumber, auto, trace and so on. In that way, Super Expander would be a toolkit of mostly graphics commands which extends Basic while Programmers' Aid would have the commands to improve your programming and debugging.
I see your point. I suppose it could be a handy tool for some personal coding stuff. I don't see much use for most coders in this to create software for 'the masses'. Most people writing stuff here are fearful of using disks or memory expansions in their programming in case some end-users don't have them. I see the same happening with this even though it's a great academic excercise.

If I remember there was only ever one commercial game that made use of the Super Expander in the Vic's heyday.

PS: I don't mean to be obnoxious or dismissive of this wee project. I'm just curious to see if this gets put to any 'real world' use... :)
"...That of the Eastern tribe being like a multitude of colours as if a rainbow had settled upon its brow..." Daniels 1:3
User avatar
Pedro Lambrini
Vic 20 Scientist
Posts: 1132
Joined: Mon Dec 01, 2008 11:36 am

Post by Pedro Lambrini »

Jeff-20 wrote:Why doesn't our wiki have a list of commands for the cart? I have never used mine because I don't really know how.
It's not in the wiki but here is a link to the manual, amongst other things, for the Programmer's Aid cart as proof read by our very own Carlsson. :)

(mod: put in the link to VIC-1212.pdf on zimmers)
"...That of the Eastern tribe being like a multitude of colours as if a rainbow had settled upon its brow..." Daniels 1:3
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Post by eslapion »

Pedro Lambrini wrote:... I don't see much use for most coders in this to create software for 'the masses'. Most people writing stuff here are fearful of using disks or memory expansions in their programming in case some end-users don't have them.
Concerning your comment about disk or RAM expansion, I would tend very much to disagree. RAM expansion on the VIC, because of its very limited 3.5k of original available RAM, is very much a norm.

I think the vast majority of VIC users here have 8k RAM expansion or more.

I still sell the Ultimate Expander with a minimum of 32k RAM expansion and up to 32k ROM options for 30$ US. I'm quite sure anybody can afford that.

The Megacart offers 32k + 3k RAM expansion and 2 Megabytes of ROM for about 100$ but that's still very cheap considering how much of a niche market the VIC is.

The bottom line is, anybody can afford to have a good RAM expansion for a VIC today.
Be normal.
Alan
Vic 20 Devotee
Posts: 280
Joined: Wed Mar 24, 2004 11:20 am

Post by Alan »

iccuwann wrote:Hi Michael, Gosh that was a fast reply.

The answer to your question is yes, I can relocate it to most areas of memory. I already have roms that run at $A000 and $B000. It will run in conjunction with the Super Expander with a couple of gocha's at the moment.
Perhaps I missed it, but is the $A000 version of the PA available? That would give us the option of pairing the PA cart with a $B000 version of VicMon.
Alan
Diddl
Vic 20 Afficionado
Posts: 425
Joined: Wed Jun 10, 2009 3:18 am

Post by Diddl »

PA+SupExp runs fine in my Final Expansion now, thanks for that!


>Perhaps I missed it, but is the $A000 version of the PA available? That
>would give us the option of pairing the PA cart with a $B000 version of
>VicMon.

Yes, same wish. A $A version of PA would be a nice feature, cause I could pair it with other tools at $B

Better than that would be a $A009 version, so I could it start automatically by a reset.
iccuwann
Vic 20 Newbie
Posts: 9
Joined: Sun Aug 09, 2009 7:15 am

Post by iccuwann »

Hi,
When I worked on the original $7000 rom, I completely disassembled it and replaced the fixed references with references which are relative to the .ORG value. This allows me to re-compile it with just about any start address. Compiling a $A000 version should be trivial. I'll take a look tonight if I feel ok - not been too well over the last couple of days.

There have been some comments about using PA to produce software which requires the end user to also have PA. AFAIK, none of the extra commands implemented by PA can actually be used within a program. The cartridge is exactly what it says on the tim - an aid for the programmer. All software produced should work on any other machine that meets the RAM requirements (plus the SE if any of that carts features were used).

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

Post by Mike »

iccuwann wrote:There have been some comments about using PA to produce software which requires the end user to also have PA.
Pedro indeed referred to SE:
Pedro Lambrini wrote:I thought there was a real hassle with the SE in that if you programmed using it only people that had one as well could use your program - not the most useful tool in the box.
That can be said about any BASIC extension or function library not part of the main program.

But yours is a flawed argument:
- regarding the "hassles" of the end user: at that time, SE was readily available, and could be bought for programs requiring it,
- regarding the "hassles" of the programmer: why should he even program for a VIC-20, when only people owning a VIC-20 would be able to use his programs?

Not to forget the SE ROM can obviously be soft-loaded like any other cartridge ROM.

It is always the software, that sells the hardware, not the other way round. In case of SE, there were obviously no good programs around that served as an incentive to buy SE.
Diddl wrote:Yes, same wish. A $A version of PA would be a nice feature, cause I could pair it with other tools at $B.
Seems to me the "N" command didn't work. :P
Better than that would be a $A009 version, so I could it start automatically by a reset.
A quick look into the PA ROM should have revealed to you, that it already contains a (currently desactivated) cartridge autostart header. :roll:
iccuwann
Vic 20 Newbie
Posts: 9
Joined: Sun Aug 09, 2009 7:15 am

Post by iccuwann »

Sorry if I misled anyone with my post earlier today.

I meant to say that I have a version compiled to run at $A009 with a manual start through SYS 40969. I did NOT mean to imply an autostarting image. For this binary I have simply replaced the first 8 bytes with $60 (RTS) to prevent the VIC from attempting the autostart process which Mike has previously stated does not work.

If anyone still wants this $A009 version (non-autostart) then let me know.

Thanks,
Darren
English Invader
Vic 20 Scientist
Posts: 1193
Joined: Tue Apr 28, 2009 3:51 pm

Post by English Invader »

@ Alan

Love the avatar 8) .
Alan
Vic 20 Devotee
Posts: 280
Joined: Wed Mar 24, 2004 11:20 am

Post by Alan »

iccuwann wrote:If anyone still wants this $A009 version (non-autostart) then let me know.

That would be super. The autostart bit is not particularly important... to me anyway.

Thanks!
Alan
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

This small program can be used to generate the $A000 version of PA from the $7000, and $B000 versions:

Code: Select all

1 POKE55,0:POKE56,30:CLR
2 R=7*4096:S=11*4096:T=10*4096
3 SYS57809"PA-7000.PRG",8,1:POKE780,0:SYS65493
4 SYS57809"PA-B000.PRG",8,1:POKE780,0:SYS65493
5 FORA=0TO4095:POKET+A,PEEK(S+A)+16*(PEEK(S+A)<>PEEK(R+A)):NEXT
6 SYS57809"PA-A000.PRG",8,1:POKE193,0:POKE194,160
7 POKE780,193:POKE781,0:POKE782,176:SYS65496
Post Reply