Author Topic: Abandoned BASIC game project  (Read 1892 times)

0 Members and 1 Guest are viewing this topic.

Offline mr_lou

  • 6128 Plus
  • ******
  • Posts: 3.206
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1370
  • Likes Given: 2694
Abandoned BASIC game project
« on: 17:38, 29 July 19 »
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.

Offline skylas

  • CPC6128
  • ****
  • Posts: 224
  • Country: gr
    • AMSTRAD SAKIS
  • Liked: 368
  • Likes Given: 420
Re: Abandoned BASIC game project
« Reply #1 on: 13:39, 25 September 20 »
The music is great!
Web: https://amstradsakis.blogspot.com
Twitter: https://twitter.com/AmstradSakis
My programs (only BASIC):
RETRO-LOADSHEET ON AMSTRAD CPC!
PENALTY KICKS!
CAPITAL QUIZ!
CAPITAL QUIZ 2! (Reverse edition)
HEADS OR TAILS (ΚΟΡΩΝΑ/ΓΡΑΜΜΑΤΑ)
HEART CHASER 1,2,3!
BARBOUTI!
STROOPIE!
BUDRUMI!

Offline mv

  • Supporter
  • CPC464
  • *
  • Posts: 44
  • Country: de
  • CPCBasic, CPCemu, CPC 6128
  • Liked: 96
  • Likes Given: 75
Re: Abandoned BASIC game project
« Reply #2 on: 13: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.
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!

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.939
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1161
  • Likes Given: 1931
Re: Abandoned BASIC game project
« Reply #3 on: 10:29, 27 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

Offline mv

  • Supporter
  • CPC464
  • *
  • Posts: 44
  • Country: de
  • CPCBasic, CPCemu, CPC 6128
  • Liked: 96
  • Likes Given: 75
Re: Abandoned BASIC game project
« Reply #4 on: 23:19, 27 October 20 »
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.
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?

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.939
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1161
  • Likes Given: 1931
Re: Abandoned BASIC game project
« Reply #5 on: 10:40, 28 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.


Quote
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?


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:


Code: [Select]
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