Page 1 of 4

Programmer's Aid cart Block 5

Posted: Sun Aug 09, 2009 12:50 pm
by iccuwann
Hi everyone,
I recently bought an old vih 20, which was my very 1st computer way back in the 80's, and started to show it to my kids. '3k!' they laughed. 'Expandable to 27k' I replied and you can extend basic. Then I remembered that with the Programer's Aid cartridge in block 3 you were limited to 19k. I had a look round and no-one seemed to have recoded this cart to run in block 5 so I decided to give it a go.
7 days later, after re-learning a lot of what I once knew, I've succeeded and I wondered if anyone would be interested in the new rom. I realise that not too many of us use the Vic and even less use basic but if anyone does want it then let me know.

Posted: Sun Aug 09, 2009 12:59 pm
by Mike
Hi, iccuwann,

Welcome to Denial!

Well here a lot of diligent BASIC, and ML users around.

Are you able to relocate Programmer's Aid to any address? I that case, here's a thread which specifically asked to put it to $B000, so it can be combined with the Super-Expander ROM.

Greetings,

Michael

Posted: Sun Aug 09, 2009 1:12 pm
by iccuwann
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.

The first is that it doesn't appear too trivial to combine the two cart into a single auto-run cart whereby the Super Expander would initialize the Prog Aid cart after it had finished its own setup.
The second doesn't appear to be a practical issue but more of a theoretical one (at least from my point of view) and that is the matter of both carts implementing the basic command "KEY" which can assign shortcuts to function keys. At the momemt there appears no issue when using the two carts (tested in VICE only at the moment) other than that of the Prog Aid cart 'overwriting' what the Super Expander had already assigned to the keys during its own setup routine. This is because Super Expander auto-starts and then you have to manually start Prog Aid by issuing a SYS 45065 command at the READY prompt.

Darren

Posted: Sun Aug 09, 2009 1:20 pm
by iccuwann
ps. I forgot to mention that there appears to be code within the Prog Aid cart that checks for the "A0CBM" starting at $B003. If it finds this then execution is set to jump to $B002. I wondered whether this was for the launching of a completely different cart - e.g. something like Vicmon which I know has images that are located at $B000 or whether the original programmer had already thought of a "Super Programmer's Aid" cart that combined these two carts into a single one. Guess we'll never know!

Darren

Posted: Mon Aug 10, 2009 2:24 am
by Mike
For some obscure reason, ftp.zimmers.net doesn't let me download the ROM of Programmer's Aid. Therefore I'd like to ask you how the commands of PA are actually wedged into the BASIC. Normally one would divert the BASIC vectors, at least that's how Super-Expander does it. As the two seemingly can co-exist, how does PA implement its commands alongside SE without hijacking the vectors? Hacking into CHRGET?
I forgot to mention that there appears to be code within the Prog Aid cart that checks for the "A0CBM" starting at $B003. [...]
That is interesting, indeed. For autostarting PA, it might suffice to replace the jump into the BASIC ROM at the end of the reset sequence of SE with JMP $B009.

Michael

Posted: Tue Aug 11, 2009 1:49 pm
by iccuwann
Hi Mike,
The answer to your first question appears to be that the commands are wedged in through the use of CHRGET. Although I haven't thoroughly dissected to code there are over 20 calls to $0073 so I think that pretty much confirms the method used.
With regard to the second point, I'd already tried that method of autostarting Programmers Aid (PA), basically adding another wedge to PA near SE's final kernal jump to $E37B, but my first few attemps just resulted in VICE locking up. I'm rusty on some of the finer points of the VIC ROM and the implementation of basic but my initial thoughts were that PA can't be started until basic has been fully initialized.
I was doing this as a 'bit of fun' while I was on holiday but now I'm back at work. I'm wondering how much more time and effort to throw at his project. If there are a few people that would like this then I'll continue and see if I can fully link the two cartridges otherwise I'll just release the new rom which can be loaded at $B000 and then manually started with SYS 45065.
Would anyone interested please post a brief message so I know whether or not to continue the work.
Thanks,
Darren

Re: Programmer's Aid cart Block 5

Posted: Tue Aug 11, 2009 4:01 pm
by Boray
iccuwann wrote:Then I remembered that with the Programer's Aid cartridge in block 3 you were limited to 19k.
But who needs more than 19K??? :wink:

Posted: Thu Aug 13, 2009 2:36 am
by Mike
iccuwann wrote:Although I haven't thoroughly dissected to code there are over 20 calls to $0073 so I think that pretty much confirms the method used.
This does not necessarily indicate a wedge into CHRGET. You'd routinely use calls to CHRGET within a BASIC extension, to scan for special keywords, symbols etc.

Normally a BASIC extension diverts the vector ($0308), to check for own tokens before giving control back to BASIC. A second BASIC extension loaded will normally hijack this vector, effectively disabling the first extension - unless the second extension has somehow be written to take the first extension in mind.
[...] my initial thoughts were that PA can't be started until BASIC has been fully initialized. [...] Would anyone interested please post a brief message so I know whether or not to continue the work.
If you provide me with the $B000 version of PA, I'll take a look into that.

PM with e-mail sent.

Greetings,

Michael

Posted: Sun Aug 16, 2009 1:17 pm
by Mike
Hi, all,

Here's the BLK5 version of Programmers' Aid, relocated to $B000.

Darren and I negotiated, and compared our two independent source codes produced from the $7000 original - with success.

Both Super Expander, and Programmers' Aid can be placed together in BLK5, and BLK3 can now be fully populated with RAM, giving 27.5 K RAM available for BASIC.

Cheers,

Michael

Posted: Mon Aug 17, 2009 2:00 am
by Diddl
>Both Super Expander, and Programmers' Aid can be placed together in
>BLK5, and BLK3 can now be fully populated with RAM, giving 27.5 K RAM
>available for BASIC.

super cool! thanks, this is useful!

Posted: Mon Aug 17, 2009 7:31 pm
by Alan
Awesome! Been waiting for some genius to do this for a long time. Thanks.

Posted: Tue Aug 18, 2009 9:16 am
by eslapion
Me too! Thanks a lot!

I will now have to make a new ROM chip for my Ultimate Expander with that combination on it.

Making a new ROM chip for previous owners of the Ultimate Expander is only 5$ US.

I have a question for you guys.

To start the original version of Programmer's aid, you had to type SYS28681 which jumps the CPU to $7009. I suppose the new version requires a jump to $B009 which is achieved by SYS45065, correct?

Posted: Tue Aug 18, 2009 9:28 am
by Mike
eslapion wrote:I suppose the new version requires a jump to $B009 which is achieved by SYS45065, correct?
Yes, it is.

Darren and I had thought about combining SE and PA in a way PA is autostarted by SE. However both ROMs are filled to the edge, and there's no good place to put that extra routine in without re-organizing some other parts of the code. So we left it as is for the moment.

Posted: Tue Aug 18, 2009 11:25 am
by Pedro Lambrini
As someone who can barely type the Hello World code could somebody explain why this is so useful. I used to use the Programmer's Aid cart a lot when I was younger and found it a handy tool but I don't get what the real gain of adding this to the Super Expander is. 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. :)

Posted: Tue Aug 18, 2009 12:12 pm
by carlsson
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.