COMMODORE PLUS/4 WORLD
  Home  Search  Games  Tapes  Covers  Cheats  Maps  Software  New Stuff 
 Hall Of Fame  HVTC  Game Endings  Solutions  Remakes  Publications  Magazines  Effects  Top List 
 Members  Groups  Features  Plus/4 Encyclopedia  Hardware  Tools  Options  Forum 
Login
Back to forumClick here to see the full topicGo to last reply

Posted By

JamesD
on 2017-12-07
00:12:22
 Re: Does the Plus/4 support some form of VARPTR() command?

well, the idea here was that the patch could automatically load without having to POKE it into memory every time you run the program. I have a fix but it's got a bug I have to track down before posting it.

It's only about a 4% speedup on the benchmark, so it's not earth shattering, but every little bit helps.

*edit*
Found my bug... I used decimal math instead of hex to set the address to patch to $00. Du-Oh!

This fixes the code so you don't have to delete line 0.
Just delete line 1 and the lines with data statements after the first time you run your program and save it.
Then every time you run it, the patch will be installed without having to POKE the patch into memory.
Please remember that any program that exceeds the size of available RAM that isn't paged in and out with ROM will break.
This makes no attempt to patch the code used to access variables or system variables indicating what RAM is available.

Just an FYI, the first DATA line contains the code that installs the patch.
The other two lines are the actual replacement code for CHRGOT.
The 2nd number in the CHRGOT code shows 01, but it's actually supposed to be 0.
That was what caused the need to delete the original code after running it the first time.


0 REM012345678901234567890123456789012345
1 FORI=0 TO 35:READ T:POKE 4102+I,T :NEXT I
2 SYS 4102

10000 DATA 160,18,185,23,16,153,121,4,136,16,247,200,152,153,122,4,96
10010 DATA 160,01,177,59,201,58,144,1,96,233,47,201
10020 DATA 240,240,235,56,233,208,96




Back to top


Copyright © Plus/4 World Team, 2001-2017