Programmer's Aid cart Block 5

Basic and Machine Language

Moderator: Moderators

iccuwann
Vic 20 Newbie
Posts: 9
Joined: Sun Aug 09, 2009 7:15 am

Programmer's Aid cart Block 5

Post 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.
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post 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
iccuwann
Vic 20 Newbie
Posts: 9
Joined: Sun Aug 09, 2009 7:15 am

Post 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
iccuwann
Vic 20 Newbie
Posts: 9
Joined: Sun Aug 09, 2009 7:15 am

Post 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
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post 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
iccuwann
Vic 20 Newbie
Posts: 9
Joined: Sun Aug 09, 2009 7:15 am

Post 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
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Re: Programmer's Aid cart Block 5

Post 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:
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
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: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
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post 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
Last edited by Mike on Thu Feb 20, 2014 6:18 pm, edited 3 times in total.
Diddl
Vic 20 Afficionado
Posts: 425
Joined: Wed Jun 10, 2009 3:18 am

Post 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!
Alan
Vic 20 Devotee
Posts: 280
Joined: Wed Mar 24, 2004 11:20 am

Post by Alan »

Awesome! Been waiting for some genius to do this for a long time. Thanks.
Alan
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Post 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?
Be normal.
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post 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.
User avatar
Pedro Lambrini
Vic 20 Scientist
Posts: 1132
Joined: Mon Dec 01, 2008 11:36 am

Post 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. :)
"...That of the Eastern tribe being like a multitude of colours as if a rainbow had settled upon its brow..." Daniels 1:3
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post 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.
Anders Carlsson

Image Image Image Image Image
Post Reply