F'n Balls

People are still making stuff for the Sinclair related machines. Tell us about new games and other software that runs on the Spectrum, ZX80/ZX81, Pentagon and Next.
Post Reply
User avatar
Andre Leao
Bugaboo
Posts: 3105
Joined: Mon Nov 13, 2017 9:28 am
Location: Portugal
Contact:

F'n Balls

Post by Andre Leao »

Andy Dansby released his new game...

Image

https://planetasinclair.blogspot.com/20 ... balls.html
d2010
Dizzy
Posts: 79
Joined: Tue Mar 26, 2019 9:19 am

Re: F'n Balls

Post by d2010 »

Andre Leao wrote: Wed Jul 10, 2019 2:25 pm Andy Dansby released his new game...
I not found downloading link. Please give me ,the downloading link, at least in send P.M . You attach the keys-message (up,down,left,right??)
:P
User avatar
Andre Leao
Bugaboo
Posts: 3105
Joined: Mon Nov 13, 2017 9:28 am
Location: Portugal
Contact:

Re: F'n Balls

Post by Andre Leao »

Just click on the word "aqui" on the message :)

"Aqui" means "here". If you have any problems downloading it (it works well here), just let me know.
Ralf
Rick Dangerous
Posts: 2279
Joined: Mon Nov 13, 2017 11:59 am
Location: Poland

Re: F'n Balls

Post by Ralf »

Are there any gameplay screenshots of this game? Showing just a loading screen doesn't give much info what's it all about.
User avatar
Andre Leao
Bugaboo
Posts: 3105
Joined: Mon Nov 13, 2017 9:28 am
Location: Portugal
Contact:

Re: F'n Balls

Post by Andre Leao »

Ralf wrote: Wed Jul 10, 2019 5:50 pm Are there any gameplay screenshots of this game? Showing just a loading screen doesn't give much info what's it all about.
Hum, not yet. Soon will play it till the end (I hope), and will write a full review.
d2010
Dizzy
Posts: 79
Joined: Tue Mar 26, 2019 9:19 am

Re: F'n Balls

Post by d2010 »

In Speccy.exe ,i cannot replace ''0' with 'A' (0 for fire).You cannot redefine the keys, you only write on at the 1st-screen,the keys.(5-left,6-up,7-down,8-right,0-fire)
Why you must write the keys at message at first screen ?
Because the keys or inkey$ , became the fast-way for playing your game.
Other ways (kempston, sinclair, joystick...) may be not work fine other emulators(fuse.exe, unreal.exe,fuse-linux.,).
andydansby
Microbot
Posts: 147
Joined: Fri Nov 24, 2017 5:09 pm
Location: Syracuse, NY, USA
Contact:

Re: F'n Balls

Post by andydansby »

Ralf wrote: Wed Jul 10, 2019 5:50 pm Are there any gameplay screenshots of this game? Showing just a loading screen doesn't give much info what's it all about.
There’s already a walkthrough

https://m.youtube.com/watch?v=LwwAw8Xn_kw
andydansby
Microbot
Posts: 147
Joined: Fri Nov 24, 2017 5:09 pm
Location: Syracuse, NY, USA
Contact:

Re: F'n Balls

Post by andydansby »

d2010 wrote: Wed Jul 10, 2019 7:03 pm In Speccy.exe ,i cannot replace ''0' with 'A' (0 for fire).You cannot redefine the keys, you only write on at the 1st-screen,the keys.(5-left,6-up,7-down,8-right,0-fire)
Why you must write the keys at message at first screen ?
Because the keys or inkey$ , became the fast-way for playing your game.
Other ways (kempston, sinclair, joystick...) may be not work fine other emulators(fuse.exe, unreal.exe,fuse-linux.,).
I don’t have a list right away, but not every emulator can run the game. Tested on a real machine, a zx Uno and Spectacular.

Andy
User avatar
DenisGrachev
Dizzy
Posts: 88
Joined: Fri Feb 09, 2018 2:32 am
Location: Novosibirsk, RU
Contact:

Re: F'n Balls

Post by DenisGrachev »

There is a snow effect on early 128k models, need to fix :)
Image
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: F'n Balls

Post by Ast A. Moore »

DenisGrachev wrote: Fri Jul 12, 2019 5:33 am There is a snow effect on early 128k models, need to fix :)
Image
Good catch!
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
andydansby
Microbot
Posts: 147
Joined: Fri Nov 24, 2017 5:09 pm
Location: Syracuse, NY, USA
Contact:

Re: F'n Balls

Post by andydansby »

I’m going to have to work with Antonio about that, I believe it’s in the Sprite engine. The rest of the code is standard C in Z88dk. Sprites are in assembly. Any clues where to look that might cause the snow effect?

Andy
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: F'n Balls

Post by Ast A. Moore »

andydansby wrote: Fri Jul 12, 2019 12:01 pm I’m going to have to work with Antonio about that, I believe it’s in the Sprite engine. The rest of the code is standard C in Z88dk. Sprites are in assembly. Any clues where to look that might cause the snow effect?

Andy
Sure, look for an OUT instruction that triggers the paging and make sure it doesn’t hit any of the contended banks. The instruction is usually OUT (C),A, preceded by an LD A,bank_number/LD BC,$7FFD combo.

When I provide game fixes, I normally use a small architecture detection code and feed the appropriate bank number values, if necessary. In simple cases (when memory constraints are not an issue and speed isn’t an issue), you can simply choose a bank that is non-contended on the 128K/+2 machines (i.e. Bank 4 or 6).

Edit: Ah, now I see that during runtime, the instructions at $f1da set the bank to 1

LD A,$11
OUT (C),A

The bank switching code itself sits in Bank 0, however. So you might need to change the loader, too, so that the appropriate code is loaded in, say, Bank 4, and then change LD A,$11 to LD A,$14.
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: F'n Balls

Post by Ast A. Moore »

M’kay, this is a little puzzling. The loader is trivial enough to fix. Replace LD A,$11 at address $5b17 with LD A,$14. Now, the runtime code at $f1da is tricky—I can’t find it on the tape image. I guess it’s generated at runtime.

P.S. It is. There’s a lot of block moving and memory rearrangement (decryption?) going on.
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
andydansby
Microbot
Posts: 147
Joined: Fri Nov 24, 2017 5:09 pm
Location: Syracuse, NY, USA
Contact:

Re: F'n Balls

Post by andydansby »

Later on after work I can share my source code and Antonio’s code. It’s all open source.

It’ll be much easier to read.

Andy
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: F'n Balls

Post by Ast A. Moore »

Cool, except I’m not very good at C. Fortunately, bank switching isn’t rocket science, I think I’ll manage. ;)
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
andydansby
Microbot
Posts: 147
Joined: Fri Nov 24, 2017 5:09 pm
Location: Syracuse, NY, USA
Contact:

Re: F'n Balls

Post by andydansby »

FASE is pure assembly. My code interfaces with Antonio assembly via a function call. I’ll fill in the details a little later on.

Andy
andydansby
Microbot
Posts: 147
Joined: Fri Nov 24, 2017 5:09 pm
Location: Syracuse, NY, USA
Contact:

Re: F'n Balls

Post by andydansby »

With the tireless efforts of Ast. A Moore and Antonio Villena. I have compiled a new version of F'n Balls. Available at http://andyspeccysite.simplesite.com/. This update fixes several bugs 1)ULA rain on 128k Toast Rack and +2 Amstrad Models. 2) Key collecting bug discovered by Ast. A Moore.

Have fun.

Andy Dansby
antoniovillena
Drutt
Posts: 17
Joined: Sat Dec 09, 2017 9:07 pm

Re: F'n Balls

Post by antoniovillena »

About the bug, it's solved. That was ULA snow because I register was $FE and in 128K $C000 is switching between 2 pages (one of them is 7 for shadow and is contended). Solved with the help of Ast A Moore who suggest to change the I register to $3B.

About the bugs when launching on 48 BASIC on 128K machines, really there are no bugs. Just use Loader or 128K mode. I'll explain here. The engine has 3 types of machines. The loader detects the mode copy the routines and run.

Machine 0: 48K. Engine exploits floating bus (only 48K timings) for anti flickering. Good case
Machine 1: 128K. Engine exploits shadow video for anti flickering. Best case
Machine 2: Other. We don't have floating bus or shadow video (detected if paging is activated). Worst case

On machine 0 we have 26k cycles to repaint sprites, so we can manage 8 sprites without flickering. When detected the bottom bar disappears, because we paint a pattern to detect when electron beam paints this part of screen. This pattern is hidden with $00 attribute.
On machine 1 we have a whole frame (69k cycles), so we have more than 12 sprites without flickering.
On machine 2 we have only 14k cycles to repaint, that's 4-5 sprites without flickering.

The detection algorithm:

Code: Select all

IF paging available
  machine 1
ELSE
  IF bus floating
    machine 0
  ELSE
    machine 2
  END
END
The problem when you choose 48 BASIC on 128k machine (disable paging) is you have incorrect detection:
-On 128K detects machine 0, so the floating bus algorithm freezes because timings
-On +2A detects machine 2, so no freezes but less sprites without flickering

Machine 2 was thought to other non sinclair clones like Pentagon.
Post Reply