Login
Forum Help



Post Your Message
Username: (Login)

Topic:
Message:
 


Previous Messages
Posted By

Csabo
on 2025-09-24
17:59:52
 Re: What's going on with this program?

Yeah, it's an apples-to-oranges comparison, but the speed is very impressive! Kudos!

You can also turn off the screen with LDA #$0B / STA $FF06 and turn it back on once it's drawn with LDA #$1B / STA $FF06 for even more of a speedup.

Some more (unsolicited happy) advice: don't recreate the original game one-to-one. The levels in the original need some extra love and more importantly difficulty balancing. Make the first ones even easier (more room to manoeuvre), or maybe put some more thought into creating "realistic" shapes. The scoring also needs improving; NOT giving any score to the players who can't beat all levels is a no-no. I'm 100% expecting a nice remix of the music though grin
Posted By

Mooce
on 2025-09-24
15:28:23
 Re: What's going on with this program?

Just a little vid clip to show how much quicker it is even with pretty rough rendering code. I know the methods are different in that I'm not painting to fill in areas, but still impressed by how easy it was to get this up and running. ML is a little quicker going by the screen clear speed being slightly faster from the basic kernal.

https://youtu.be/vHs-_u9ioKI

Thanks for your help so far chaps. I've found that the vertical scan value is available through a ted structure built into Oscar64. I've never really got into the hardware of the plus4 as I only used BASIC so this is a learning curve for me, but the bitmap mode I could just about get my head around.
Posted By

gerliczer
on 2025-09-24
10:57:14
 Re: What's going on with this program?

The Oscar64 compiler has support for interrupts, according to the manual. So, there should be no need for busy loop waits.
Csabo1
Posted By

Csabo
on 2025-09-24
10:27:26
 Re: What's going on with this program?

In ML, one would check the value of $FF1D (vertical scan) to ensure drawing on screen occurs once per frame, and outside the screen to avoid tearing.

It would be something like:
LDA #$CB
loop CMP $FF1D
BNE loop


Hope this helps happy
Posted By

Mooce
on 2025-09-24
05:16:38
 Re: What's going on with this program?

I have an Umbrella called Oscar64 Rachy wink
Have you tried it? It's not your normal 6502 compiler. I have tried cc65 and vbcc and I'd agree with you there that they are slow, but oscar64 is different. I'm in fact finding that I need to find a way to slow down the rendering of the ship for Landit as it's drawing it too quick! I'm hoping there's a vsync feature to look for that may help.
Posted By

Rachy
on 2025-09-24
00:36:28
 Re: What's going on with this program?

Don't want to rain on your parade, but don't expect a massive improvement over BASIC. C is still way too high level for these machines. You can inline assembly in C or there are a few libraries out there that solve things in machine code like rendering sprites and whatnot.
Posted By

Mooce
on 2025-09-23
18:24:13
 Re: What's going on with this program?

(For some reason my posts keep getting truncated, sorry for spam)

I've started remaking it again using oscar64. I have the multicolor bitmap mode activated and have written some rendering functions, it's a shed load quicker to draw the levels using c.

There are a lot of very clever coders here so I might have to quiz some of you when it comes to doing the music but so far it's making sense with the info available here for the graphics. It's quite interesting to see how much speed is available when not using BASIC.
Posted By

Mooce
on 2025-09-23
18:23:32
 Re: What's going on with this program?

Thanks for updating the pictures of the levels on the site, and to see the old listing again after all these years is quite emotional.
Posted By

Mooce
on 2025-09-23
18:22:22
 Re: What's going on with this program?

Somebody didn't test their submission, eh?

It'll be that boredom thing again
Posted By

Csabo
on 2025-09-23
13:08:31
 Re: What's going on with this program?

I guess I got bored after a while and just did a run of notes towards the end.

That's hilarious grin But I can totally imagine doing something like that myself too. Meanwhile Ulysses777 to the rescue (who also did the initial type-in): we now have the scans online!

I found a bug too... Level 6 appears to be impossible to complete. The starting coordinates put you inside a wall, therefore each time you reach that level, you immediately crash. The culprit seems like N=55 in line 62. By changing this to a smaller number (e.g. N=53), the player can at least attempt to navigate! I wanted to wait until I saw the actual mag before mentioning this, in case it was a typo. Somebody didn't test their submission, eh? grin
Posted By

Mooce
on 2025-09-23
10:32:21
 Re: What's going on with this program?

Could it be a typo in the data

It's more likely a typo in my brain wink
I was learning to play drums back in those days so knew very little about music although I have good relative pitch. I can vaguely remember singing notes and typing sound commands while looking at page 204 of the manual and choosing what sounded right. A very laborious process. I guess I got bored after a while and just did a run of notes towards the end. I found it a bit easier later on when I got given a Bontempi Air organ that I could at least get the note names from. lol

https://replayguitars.com.au/products/bontempi-b1-air-organ-second-hand
Csabo1
Posted By

Csabo
on 2025-09-23
08:51:30
 Re: What's going on with this program?

Thanks for the interest.

Myself (and several others who hang around this forum) absolutely LOVE to read about these old stories wink If you do find it, please scan the pages, we would love to have that archived.

I've looked into the game a bit again just now, and I was surprised that there are 7 levels. That's neat! Also... what's up with the music? It has a nice beat (which somehow sounds like it's "ahead of it's time" with the drums going on, especially for music from BASIC games), and starts out okay, but gets very "strange" very quickly. Could it be a typo in the data, or is this the intended melody? Do you recall anything about how you came up with it?
Posted By

Mooce
on 2025-09-23
05:52:04
 Re: What's going on with this program?

Thanks for the interest.
Do I have the magazine? maybe... It might be in a cupboard somewhere, I'll have a look when I get a chance. Funnily enough that's what I went looking for online to see if Landit existed on the web, only to discover that it was here.
Development? well I just wanted to see if I could get something published in a mag. happy

My parents brought the plus 4 as it was cheap, I had no interest in computing back then as it was expensive and a new thing.
Back then I was a wannabe pilot and was hoping to do some flight simming on it, flying being even more pricey. That's how I started coding, by wanting to write a flight sim.
Of course, the +4 was way too slow to do this using BASIC, however BASIC 3.5 with its graphics commands was a great way to learn and it gave me the interest to get into IT which did allow me to afford learning to fly!

Landit came about as it was the simplest thing I could get to run at a playable speed using BASIC, the mag returned it on the first attempt as they said it needed a better ship graphic, it was just a pixel originally so the s/gshape commands were used, slowed it down quite a bit!

Nowadays I code in c++ on Windows and having recently discovered oscar64 am having a go coding the old plus 4 using it, maybe I'll redo Landit in C.
Csabo, Litwr, Patrick3
Posted By

Csabo
on 2025-09-22
13:04:51
 Re: What's going on with this program?

Hey there, do you still have the magazine by any chance? We're missing the scans for this issue, doesn't seem to be archived anywhere online. (E.g. here it's one of the only issues missing.)

Any other details you could share (about the game, how it was developed, about your career with the machine, etc)? happy
Posted By

Mooce
on 2025-09-22
12:13:06
 Re: What's going on with this program?

Digging up the past but I never expected to cause such a fuss with Landit when I wrote it back in the 80s as a kid learning to code. Nice to see it got some playtime and work toward making Yape even better.
Csabo, Rachy2
Posted By

Ulysses777
on 2006-01-26
18:16:42
 Re: What's going on with this program?

That seems to be it happy

After reading your posts, I checked some of my other real machines, and found another Plus/4 where the power up pattern was near exact to the settings in that pic (except that the first byte is 255), and it dosen't work!

I also tried it on my C16 + 16K expansion (same power up pattern as above) and my C116 + 16K (length of constant values = 2) and it doesn't work on those either!

When I get the time, I'll check the power-up patterns on the rest of my machines happy
Posted By

Gaia
on 2006-01-26
17:09:49
 Re: What's going on with this program?

Well, I have found it! happy It is VERY weird...! The "bug" is rather one of the real machine's ROM program and is depending on the power up pattern! Up until around version 0.24 of Yape I used no pattern but simple zeroes then changed it to what it is now (and reflects one of my C16's as I recall). I have regenerated the error in VICE since it has a dialog window for setting the power up pattern of the RAM:



In the background you can see the messy screen. I secretly suspected that this could be the reason for the bug but it seemed so unlikely. Now, THIS could be a challenge to figure out! happy

There's one another game (at least) that has been showing similar symptoms: Menekülés. If the memory is completely zero between area $400-$700 (except for the CHRGET and CHRGOT locations of course) it will not pass the title screen after pressing F1.
Posted By

Gaia
on 2006-01-25
18:09:11
 Re: What's going on with this program?

This is weird! I have just checked... it ceased working in version 0.24 (!!!) :-D I have no idea what it is, but looks challenging for sure... happy
Posted By

Ulysses777
on 2006-01-25
15:44:18
 Re: What's going on with this program?

No joy with a D64

It's only Yape and Artifex that have problems with it, it works normally on VICE and Minus4.
Posted By

Csabo
on 2006-01-25
11:38:13
 Re: What's going on with this program?

Any luck with the bug, or loading the program from a D64 file?
Posted By

Litwr
on 2006-01-25
01:05:19
 Re: What's going on with this program?

I can add that standard Basic LOAD and DLOAD subroutines establish (recalculate) links (pointers to next line) between lines of Basic programs. Quickloaders of all (?) emulators don't do such recalculations.
Posted By

indi
on 2006-01-24
12:46:27
 Re: What's going on with this program?

yep, I realise this... but if I "quickload" load a program to its .PRG location and then set its basic address, then this will work for 99.9% of PRG files. For those that dont have any basic attach, it doesnt matter that basic is forced to $1001, and for those that do, then it'll probably need to be there anyway.

This doesn't account for graphic program though, which if memory serves (although it's has been a while...) start after the screen.?.? Higher up in memory than $1001.

However, since Quickloading and the uploader dont go through the rom to "correctly" load programs, this is good enough.
Posted By

Gaia
on 2006-01-24
06:38:04
 Re: What's going on with this program?

basic and in fact all .PRG programs should start at $1001.

Well... no! If you save something from MONITOR, like S "PRG",8,2000,4000 then it will load back from the BASIC start address pointed to by zero page address variables $2B/$2C (=$1001 by default) if you use the DLOAD command or LOAD"PRG",8. What the KERNAL really does, by default it loads on from the address found at $2B/$2C and throw away the first 2 bytes of the PRG. Only if you load it back from MONITOR or with LOAD"PRG",8,1 will it load back to the correct address specified as the first 2 bytes of the PRG. Note that many BASIC programs were saved after graphics were on, so their first 2 bytes of the PRG point to address $4001. You should cope with this in your transfer routine.

As for this strange bug... I did try loading it from under the fake 1551 (IEC) emulation mode from the PC directory with no luck. I'll see if D64 works out well but I doubt it... it is very strange indeed. SHAPE's are stored as strings at the end of the BASIC RAM with a pretty standard operation (memory allocation and such).
Posted By

indi
on 2006-01-24
06:07:37
 Re: What's going on with this program?

Yep, the uploader you have has a small bug in it. If you look at the first 2 bytes of the .PRG and if its not going to address $1001, then the uploader sets the start of basic wrong.

I'll upload a newone tonight. Some programs seem to save from $1000 or less for some reason, but basic and in fact all .PRG programs should start at $1001.
Posted By

Crown
on 2006-01-24
05:16:11
 Re: What's going on with this program?

Have you tried to put it on a D64, and load it from there in Yape?... I would not be suprised if it would work correctly this way.
Posted By

Ulysses777
on 2006-01-23
16:35:16
 Re: What's going on with this program?

Ok, I've found that the bug happens when the first GSHAPE statement is executed in line 38. Also, if you press Run/stop after the SSHAPE statements are run, then enter (eg GSHAPE B$) in direct mode, the bug happens again.

However, if A$ (in line 3) is not given a value (in other words, wait until the demo mode starts) then the game runs normally. It appears that if a string variable is given a value before the GRAPHIC 3,1 is executed in line 8, then the bug occurs when GSHAPE is executed. :/
Posted By

Csabo
on 2006-01-23
14:56:18
 Re: What's going on with this program?

So we've narrowed it down to YAPE. That's Gaia's territory. However, since it's a basic program, somehow I think there could be something else other than an actual YAPE bug... Basic programs should run fine, they are actually easier to emulate than demos or other games.

Perhaps to assist Gaia we could try to comment out lines and then run it from YAPE. Once it runs fine, we can narrow it down to the line (or statement) that causes the "crash"/messup.
Posted By

Ulysses777
on 2006-01-23
10:48:26
 Re: What's going on with this program?

>I assume you are 100% sure that the program on the real Plus/4 is byte-to-byte identical to the downloadable prg file, but I still have to ask... Are you 100% sure?



Looks like it didn't transfer properly after all

I used Mike's uploader proggy the first time, so I tried it again today using cbm4win and it works fine on a real machine now happy

Still doesn't work properly in YAPE though...
Posted By

Csabo
on 2006-01-22
19:55:26
 Re: What's going on with this program?

Sounds weird. I checked it out, it IS weird. I assume you are 100% sure that the program on the real Plus/4 is byte-to-byte identical to the downloadable prg file, but I still have to ask... Are you 100% sure? happy

Let's start with the real machine. Line 13 is perfectly innocent, as long as we're in multicolor graphics mode. I'd guess there was a typo (or some kind of transfer error), so instead of grA3,1 is says grA1,1, so the DRAW 2, whatever throws an ILLEGAL QUANTITY. Or could there be something up with the loop counter?

About the emulation part: no idea. I'm being soo helpful, aren't I?
Posted By

retroscener
on 2006-01-20
19:42:38
 Re: What's going on with this program?

that's pretty cool, i didn't expect the maze multiscreen action. nice use of the GRAPHIC command. where did you find that listing?

i've started work on another one the other day also, i'm around halfway through it, just been soooo busy.
Posted By

Ulysses777
on 2006-01-20
14:25:20
 What's going on with this program?

Ok, I've started on the type-ins again, and finished this one:

Land It

Now after the game is started and after the graphics are drawn, different stuff happens depending on whether it's run on a real machine or on certain emulators.

On VICE, Minus4 and Winemu, it runs OK. On YAPE and Artifex, it starts producing messed up graphics and won't stop with Run/Stop. On a real machine, it comes up with an ILLEGAL QUANTITY error in line 13.

However, no errors occur if a GRAPHIC area is allocated in direct mode prior to running the game.

Any ideas? happy

Copyright © Plus/4 World Team, 2001-2025. Support Plus/4 World on Patreon