News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_mr_lou

Abandoned BASIC game project

Started by mr_lou, 15:38, 29 July 19

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mr_lou

For a long time I'd wanted to make a 100% pure BASIC game, and have started several attempts. But there's just never any time for anything, so I never get far before I end up never working on the project again.

Here's one of those projects that I'm posting here in case someone wants to take over. As mentioned, I never get far. This is only a simple title screen and some intro music with a tiny man walking.
If anyone wants to take over, feel free. But post here if you do, to avoid two people working on the same.

skylas

Web: https://amstradsakis.blogspot.com
Twitter: https://twitter.com/AmstradSakis
My programs (only BASIC):
RETRO-LOADSHEET!, PENALTY KICKS!, CAPITAL QUIZ!, CAPITAL QUIZ 2! (Reverse edition), HEADS OR TAILS (ΚΟΡΩΝΑ/ΓΡΑΜΜΑΤΑ), HEART CHASER 1,2,3!, BARBOUTI!, STROOPIE!, AMSTABOO!
TEXT ADVENTURES:
BUDRUMI!, ART WAR!, BATTLE OF LENINGRAD!, RODOLFO SKYLARRIENTE 1 and 2!

mv

That's tricky!
Printing MODE 1 bitmaps in MODE 2 and view them in MODE 1.

I tried to implement this feature in CPCBasic, but its internal pixel buffer does not use the screen memory architecture from the CPC (that's just a simulation for PEEK&POKE).
And changing all the screen drawing routines...
So I put in a compromize:
CALL &BD1C,1 will convert the screen memory to MODE 1.
Calling &BD1C again will convert the whole screen again, so we cannot use it for the moving man.
You can check it here:
https://benchmarko.github.io/CPCBasic/cpcbasic.html?database=apps&example=demo/basworld
(Poking the color also does not work.)

I also like the music!

AMSDOS

Quote from: mv on 11:50, 11 October 20
That's tricky!
Printing MODE 1 bitmaps in MODE 2 and view them in MODE 1.

I tried to implement this feature in CPCBasic, but its internal pixel buffer does not use the screen memory architecture from the CPC (that's just a simulation for PEEK&POKE).
And changing all the screen drawing routines...
So I put in a compromize:
CALL &BD1C,1 will convert the screen memory to MODE 1.
Calling &BD1C again will convert the whole screen again, so we cannot use it for the moving man.


I'm not liking these Firmware Calls from BASIC which use the extra parameters, especially after the Warzone game I converted to run on the 464 the other day won't work on a 664 because of statements like CALL &BC06,&C0 and CALL &BC06,&40.
It's possible switching screens using OUT statements, so perhaps that would be the best course of action, though I'm unsure if &BD1C is available from an OUT statement.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

mv

Quote from: AMSDOS on 09:29, 27 October 20I'm not liking these Firmware Calls from BASIC which use the extra parameters, especially after the Warzone game I converted to run on the 464 the other day won't work on a 664 because of statements like CALL &BC06,&C0 and CALL &BC06,&40.
It's possible switching screens using OUT statements, so perhaps that would be the best course of action, though I'm unsure if &BD1C is available from an OUT statement.
Good point! I never tried CALL &BC06 on a CPC 664... I see... not good to modify register SP.
Hmm, we could memorize the byte at &BC06, set to e.g. zero, CALL it and restore. Or even better, use CALL &BC07! Who came up with &BC06?

CALL &BD1C is different. You can try to set the mode with OUT &7Fxx but this is not permanent. You have to modify register BC' as well. Luckily, the CALL is the same on all CPC 464/664/6128. And isn't it a nice trick to set register A with the number of arguments?

AMSDOS

Quote from: mv on 22:19, 27 October 20
Good point! I never tried CALL &BC06 on a CPC 664... I see... not good to modify register SP.
Hmm, we could memorize the byte at &BC06, set to e.g. zero, CALL it and restore. Or even better, use CALL &BC07! Who came up with &BC06?

The author of Warzone, Richard Shephard was using these, the original game was written using BASIC 1.1 and published in AA68 in 1991, so it could have been written on a 6128 or Plus.


QuoteCALL &BD1C is different. You can try to set the mode with OUT &7Fxx but this is not permanent. You have to modify register BC' as well. Luckily, the CALL is the same on all CPC 464/664/6128. And isn't it a nice trick to set register A with the number of arguments?


Okay, well I never meddle with the Alternative Register Set, I tried it on the 2 Emulators I have on this Mac, but  it didn't seem to do anything and just thought better stop before I have a Busted Mac too.
Why not just a short MC subroutine, do things proper without a catch-22:


a$="3e00cd08bcc9":c=0:for p=1 to 11 step 2:poke &160+c,val("&"+mid$(a$,p,2)):c=c+1:next
poke &161,&40:call &160
poke &161,&C0:call &160
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Powered by SMFPacks Menu Editor Mod