Login
Back to forumReply to this topicGo to last reply

Posted By

retroscener
on 2013-12-15
17:52:35
 Some APS Adventures

As I'm also a heavy user on the Commodore 64 and also like my adventure game fix, I've noticed a bunch of Argus Press Software adventures that are virtually compatible with the Plus4, just a few minor COLOR POKE differences. So I've spent this afternoon converting a bunch of Argus Press C64 text adventures to the Plussy. Unfortunately none of these seem to be C16 compatible so far although 2 or 3 loads up fine but recieve an out of memory error when run.

Once my head stops spinning and my mind wakes up after this, I might actually have the energy to play a few.

Edit: Links removed until further testing.

Posted By

Csabo
on 2013-12-13
20:29:06
 Re: Some APS Adventures

Are these play-tested and release ready? After a very quick glance, I found some problems:

In "A Fairy Tale Adventure", line 11050 has a GOSUB 1290, but 1290 does not exist, so the game will break when that point is reached.

"The Pyramid" seems to have it's printed title missing. Also the yellow on white is not the best choice...

"Spaced Out" is saved from an incorrect address (not $1001). This should be easy to fix, just DSAVE it. After going N, E, E, it say you can see "adoor". Could be a bug in the original?

"The Forest of Evil" seems to have 2 unnecessary extra spaces at the beginning of every single line... (All the other games "only" have one extra space.) I mean technically it's OK, but all it will do is waste space and slow down the execution. For 285 lines, that 570 bytes. Removing those, plus a simple RENUMBER 0, 1 (which should be done to all production ready BASIC games IMHO), it almost fits into 16K. By removing more of the whitespaces, you could definitely make this one fit.

The effort is definitely appreciated, and if you wish I'll be more than happy to add them into the database as releases. Just want to make sure it's ready. When converted a big bunch back in 2004, I also put Austro on them (better experience for the player).

Posted By

retroscener
on 2013-12-13
21:38:18
 Re: Some APS Adventures

oops, ta for that Csabo. I'll check out these problems tomorrow, playtest them again and re-upload them. Obviously without a solution I can't playtest them all the way through. I did playtest them enough to begn the game properly, also to make sure the save/load and quit functions were working adequately.

Some of these errors you describe must also exist in the C64 version. The Pyramid game didn't have a title screen in the C64 version, but I can add one. The reason I didn't add austrospeed this time was so the person could look at the code (and just as well with these errors it seems), but yeah game speed is more important, I'll iron them out. Cheers.

Posted By

Csabo
on 2013-12-13
22:06:21
 Re: Some APS Adventures

Well, putting Austro on them would also mean that they will likely be 64K only. So if 16K compatibility is a goal, you could skip it happy

Also, for solutions: you can check here, they have a MASSIVE list: http://solutionarchive.com/list/

Posted By

retroscener
on 2013-12-14
15:35:01
 Re: Some APS Adventures

ah solutions would spoil my enjoyment lol. I'm guessing it is probably only a few errors where I was converting.

I have tried to run them all in 16K but none work. Although some loads entirely within 16K, they unfortunately produce an Out Of Memory Error when run

Updates:

The Pyramid - Fixed the title screen. Changed background and border colours to black.

The Forest Of Evil - Removed all unneccesary spaces throughout the whole listing (not just the extra space after the line number) and then renumbered the whole listing in increments of 1 to save more memory but still getting an Out Of Memory Error in line 14 (the original line 75) in unexpanded C16 mode. In fact the line renumbering has now oddly given the plus4 the same error, I've requadrupled checked the listing witha fine toothed comb and I'm certain all the GOTO's, GOSUB's & IfxTHENxxxx's go to the correct lines, no idea why it's playing up now. I think we may have to keep the original line numbering order although I have still removed the unnecessary spaces, it works on plus4 fine fast enough and I don't believe there's quite enough memory for the unexpanded C16 anyway, even without REM's and a title screen.

Spaced Out - The "adoor" typo was in the original. In fact all the usable items had the same problem. Now fixed.

Fairy Tale Adventure - Fixed the 1290 bug which is supposed to be 11290 (the error is also in the C64 version), and I've removed extra spacing between line numbers and code.

A few other necessary fixes.

Question: How do you clear the keyboard buffer? I know it's one simple POKE on the C64. I'm wondering if it might fix the problem on the unexpanded C16.

Posted By

angelsoft
on 2013-12-14
12:00:01
 Re: Some APS Adventures

poke 239,0 clears the keyboard buffer.

Posted By

retroscener
on 2013-12-14
15:33:49
 Re: Some APS Adventures

Thanks dude.

But I've stumbled on a real problem with austrospeed.
Every .prg file I try to compress comes up with a lot of ?UNDEF'D STATEMENT ERROR's during the compressing

i don't get it. There are no missing lines, the listings are not pointing to lines that don't exist. There are no TRAP commands. They're all error free as far as I can see. I've even removed the unnecessary double spacing not that it should make any difference.

I never had this problem with Escape From Raka-Tua +4

Posted By

Csabo
on 2013-12-14
17:05:25
 Re: Some APS Adventures

Hey, looks like you're making some good progress. The releases will be all the better cause of the extra attention to detail happy

Could you upload or email me the current version Forest of Evil? I'd like to take a look, I'm pretty sure we could make it run on a 16K machine.

Posted By

KiCHY
on 2013-12-14
17:38:10
 Re: Some APS Adventures

Perhaps my memory cheats me but I remember some kind of BASIC compressor which scanned the basic lines and concated then into max. 256 bytes long lines (spared the goto, gosub lines). This also could save several bytes.

Posted By

Csabo
on 2013-12-14
19:39:24
 Re: Some APS Adventures

You're absolutely right, that program exists and works: BASIC-Packer.

Edit: I threw together a little (unreleasable) tool for myself to fiddle with BASIC programs. One thing I found that while the BASIC interpreter does die on lines that are > 256 bytes, it works completely fine for DATA lines. I merged all the data in Forest of Evil into a single line, which was a whopping 10000 bytes in length! The interpreter can't list it (only lists the first 256 bytes), but it reads from it just fine. Also seems to be able to execute the lines that are after the long one.

But alas, in this particular case it's all for nothing, as there's another program bug in this one: from line 1075 there's "important" game logic, but nothing GOTOs or GOSUBs to that line, and the RETURN in the previous line means this is dead code, it's never reached.

Posted By

retroscener
on 2013-12-15
17:50:35
 Re: Some APS Adventures

Here's a link to all the one's I've done so far Csabo, minus austrospeed. I have put a note in the .rar file for you.

https://www.mediafire.com/?h4kxykf2z4ymjkw
I have probably made some classic cock-up somewhere and really want to know what that is, I'm still scratching my head over it

These are the links to the C64 versions.

Steve W. Lucas Adventure Games

Arctic Wastes!

Spaced Out

Jungle Bunny
Yes, I am well aware the last game has a somewhat dubious title.


Posted By

Csabo
on 2013-12-15
13:08:24
 Re: Some APS Adventures

So I'm focusing only on FOE right now. Austro is supposed to have some issue with POKEs, so I changed setting the color. (BTW, COLOR0,2:COLOR4,2 is also a lot fewer bytes than the two POKES.) It gave me the same error, I don't think it's the BASIC program's fault, looks like Austro's. Was that the question you had? It really doesn't look like you messed anything up. For that game in particular, the only thing that needs fixing is the issue I mentioned above.

Posted By

retroscener
on 2013-12-15
13:44:15
 Re: Some APS Adventures

Well I wondered all sorts of things, very strange indeed. I had no bother with "escape from raka-tua".

I was planning on converting some more interersting A.P.S titiles (not just adventures), but if austrospeed is going to be a bother... Well the original C64 versions aren't compressed anyway and they have a slightly slower processor.

Posted By

Csabo
on 2013-12-15
16:22:26
 Re: Some APS Adventures

The problem I run into is that I spend too much time on any one release, and try to make it "perfect" (even though there's no such thing). For FOE, these are the things that I notice (all of them using the original line numbers):

- The GOSUB 1000 in line 110 is not necessary, since that's the only place this "subroutine" is called. It should be "inlined". The GOSUB/RETURN just slows down the execution. (That code itself could be written much nicer, it checks items 1, 6, 8, 9, 10 and 15 and gives a point for each. The order of the items don't matter. If those particular items were reorganized to be the first 6, a simple loop could count them.)

- The IFs between 110-145 are clumsily written. There's no need to check/print each direction twice. Instead, the directions should all be added with a leading comma (e.g. ",NORTH" ",SOUTH" etc) and then the first character cut.

- The only real subroutine is in line 2000. BASIC doesn't have a line lookup table, so when you do a GOSUB 2000, it has to look through every single line to find where that is in the memory. Therefore, a simple trick you can do to speed up execution is to move that subroutine to line 1 (and line 0 of course would be a GOTO 2 to skip it).

- Otherwise, there's lot of very simple optimizations that can be done. SCNCLR is only one byte versus PRINTCHR$(147), which is 7 bytes. Instead of PRINT:PRINT:PRINT etc, one could do a single print and include the cursor down character.

So, I would spend too much time on these happy And I don't know if it's worth it. I'm always behind on Plus/4 stuff happy My recommendation would be: 1) fix that one bug (line 1075 is never reached, but a lot of the logic is there). 2) test that it can be played through. 3) pack it with BASIC packer and release it. happy

Posted By

retroscener
on 2013-12-15
17:49:45
 Re: Some APS Adventures

I looked at the basic packer briefly but seems it comes with no instructions and i'm a bit of an idiot without them, lol.

I forgot all about SCNCLR.

I remember seeing in one of the adventures with a load of needless GOSUBS where a GOTO or THENxxx would have sufficed (xxx being the line number). I didn't change it as it didn't seem to cause the game any errors as a RETURN command wasn't needed as I think it just led to the END command anyway, lazy programming I gathered (what do I know though).

All these games definitely works on Plus/4 though. Maybe one or two might work on the C16 with a few changes but I doubt anymore than that. I'd like to learn more about this basic packer.

I'll take another look at it tomorrow. Thanks for your suggestions

Posted By

Csabo
on 2013-12-15
17:31:22
 Re: Some APS Adventures

Ah, you're right about no instructions, and it's in German too happy I added some English instructions, should be a quick and easy read happy

Posted By

retroscener
on 2013-12-16
08:26:18
 Re: Some APS Adventures

- The GOSUB 1000 in line 110 is not necessary, since that's the only place this "subroutine" is called. It should be "inlined". The GOSUB/RETURN just slows down the execution. (That code itself could be written much nicer, it checks items 1, 6, 8, 9, 10 and 15 and gives a point for each. The order of the items don't matter. If those particular items were reorganized to be the first 6, a simple loop could count them.)

Reorganizing them from 1-6 is beyond me, it would mean renumbering everything else and not sure how to do that, although I feel now that this is the least of the problems.

fix that one bug (line 1075 is never reached, but a lot of the logic is there)
You're right. 1075-1115 are completely ignored throughout the game but shoudn't be, it should be able to read line 1100 but there's nowhere to jump to that line. I've had a play through and when it gets to that certain part, it cuts out some story dialogue. In fact part of the full solution is supposed to give a box of chocs to a girl to make her come with you. But in the version on GB64 you don't need the chocolates and thus you also don't need the pound coin to buy them which renders them both useless, which takes away a big puzzle element out of the game. Obviously another bug.

I also have a feeling that the programmer created himself into a paradox especially from lines 1075-1115 and just thought fck it, it's still completable.

Maybe I'll give "The Forest Of Evil" a break for now and look at the others.

Posted By

Csabo
on 2013-12-16
08:57:50
 Re: Some APS Adventures

Yes, reorganizing the items would be a big undertaking. I just mentioned that to illustrate the insane lengths *I* would go to before I'd feel it's "good enough". I did them same for Rebel Planet - the game is a faithful conversion in terms of gameplay and graphics, but the code is faster and smaller happy

The other suggestion though (to "inline" those few lines of code) is very simple to do and should probably help increasing the speed (as well as reducing the file size a little).

That dead code should be the handler for one or more of the verbs. There's some earlier code that check which verb you're using and then GOTOs to those areas. All you'd have to do (I think) is check which messages are being printed and which items are being referenced in the IFs, then you could figure out which verbs should be GOTOing there.



Back to topReply to this topic


Copyright © Plus/4 World Team, 2001-2024