Benny Bunny: Burrows (Boriel BASIC)
Benny Bunny: Burrows (Boriel BASIC)
As you may have seen by my recent posts I'm getting to grips with Boriel BASIC. Because of the current pandemic I have, unsurprisingly more spare time.
I've always liked the Benny Bunny series of type-ins from Sinclair Programs, so thought I would have a go at converting them. Mainly to gain experience of the difference between ZX BASIC and Boriel BASIC and to see the speed increases. It's probably around 5 times faster to draw the screen, and the moving bugs are the bottom of the screen move at lightning speed.
The original game is here:
https://spectrumcomputing.co.uk/index.p ... 6&id=24322
So far I have drawn up the screen and added some of the sounds. This WiP can be downloaded here (as a tzx file):
https://drive.google.com/drive/folders/ ... sp=sharing
If anyone has any suggestions for BASIC programs that could do with a speedup, let me know!
I've always liked the Benny Bunny series of type-ins from Sinclair Programs, so thought I would have a go at converting them. Mainly to gain experience of the difference between ZX BASIC and Boriel BASIC and to see the speed increases. It's probably around 5 times faster to draw the screen, and the moving bugs are the bottom of the screen move at lightning speed.
The original game is here:
https://spectrumcomputing.co.uk/index.p ... 6&id=24322
So far I have drawn up the screen and added some of the sounds. This WiP can be downloaded here (as a tzx file):
https://drive.google.com/drive/folders/ ... sp=sharing
If anyone has any suggestions for BASIC programs that could do with a speedup, let me know!
-
- Manic Miner
- Posts: 205
- Joined: Thu Feb 22, 2018 3:27 pm
- Location: virginias eastern shore
- Contact:
Re: Benny Bunny: Burrows (Boriel BASIC)
Or you could use SpecBAS and see a really fast result. (Mischievous grin!)
I have never used Boriel Basic but I did ask Boriel about it recently on a chat site and it sounds like it would be an interesting application to try out, so I'm intrigued by your remarks.
However with Dunny helping me to get to grips with programming using strings and arrays (yes, I'm pretty backward) I think I'll get my SpecBAS efforts working properly before I try yet another application to add to my hard drive full of programming languages that were recommended to me but turned out not to be as easy as promised. EG Python.
You can't beat having a tutor who wrote the language though.
I have never used Boriel Basic but I did ask Boriel about it recently on a chat site and it sounds like it would be an interesting application to try out, so I'm intrigued by your remarks.
However with Dunny helping me to get to grips with programming using strings and arrays (yes, I'm pretty backward) I think I'll get my SpecBAS efforts working properly before I try yet another application to add to my hard drive full of programming languages that were recommended to me but turned out not to be as easy as promised. EG Python.
You can't beat having a tutor who wrote the language though.
Re: Benny Bunny: Burrows (Boriel BASIC)
I'm going to send you over a long list of football management games!
Re: Benny Bunny: Burrows (Boriel BASIC)
[mention]llewelyn[/mention] SpecBAS is on my list to try!
I tried Python too. I've loads of Raspberry Pis, but didn't really enjoy it.
I tried Python too. I've loads of Raspberry Pis, but didn't really enjoy it.
Re: Benny Bunny: Burrows (Boriel BASIC)
Start getting that list together!
Re: Benny Bunny: Burrows (Boriel BASIC)
Can anyone help me with what the purpose is of line 6015?
https://archive.org/stream/sinclair-pro ... 7/mode/1up
Whats the reason for the pointing Z to 99 below the first UDG address, then poking it with 255 in line 6200?
Thanks
https://archive.org/stream/sinclair-pro ... 7/mode/1up
Whats the reason for the pointing Z to 99 below the first UDG address, then poking it with 255 in line 6200?
Thanks
-
- Manic Miner
- Posts: 205
- Joined: Thu Feb 22, 2018 3:27 pm
- Location: virginias eastern shore
- Contact:
Re: Benny Bunny: Burrows (Boriel BASIC)
Peter I'm writing a blow by blow account at my ZX BASIC blogspot if you would care to take a look? If you scroll down through the entries, the saga starts at BASIC PARSER but the latest entry explains where I'm at and the previous two are saves of the chat sessions where Dunny teaches me how to create and use a string array in SpecBAS. Thanks. Mike
Re: Benny Bunny: Burrows (Boriel BASIC)
There is a small machine code routine at z - see line 60 which has randomize usr z. If someone else hasn't already, I'll piece the routine together later on tonight.PeterJ wrote: ↑Wed Apr 01, 2020 3:33 pm Can anyone help me with what the purpose is of line 6015?
https://archive.org/stream/sinclair-pro ... 7/mode/1up
Whats the reason for the pointing Z to 99 below the first UDG address, then poking it with 255 in line 6200?
Re: Benny Bunny: Burrows (Boriel BASIC)
The code is initially poked into memory by line 6015 using the data from line 6030, this disassembles to:
I'm not sure how this is returning to basic normally, but if you're running the listing in an emulator it shouldn't be hard to see.
So since this is sending outs to port 254 and toggling bit 4, this is "obviously" some sort of sound effect routine, the parameters are tweaked by various basic lines before use.
For hand disassembly you may find http://clrhome.org/table/ useful.
Code: Select all
dec b ; line 8599 changes this to 243 = di
ld de,&0210 ; d changed by line 160
outer:
ld h,1 ; h changed by line 160 and line 1510
ld a,(&5c48) ; border colour (https://skoolkid.github.io/rom/buffers/sysvars.html)
rra
rra
rra
inner:
ld c,254
xor %00010000
out (c),a
ld b,e
wait:
djnz wait
dec h
jr nz,inner
inc e ; line 1510 changes this to 28 = inc e and then 29 = dec e
dec d
jr nz,outer
ei
So since this is sending outs to port 254 and toggling bit 4, this is "obviously" some sort of sound effect routine, the parameters are tweaked by various basic lines before use.
For hand disassembly you may find http://clrhome.org/table/ useful.
Re: Benny Bunny: Burrows (Boriel BASIC)
Ah yeah, it looks like the sound effects for picking up the diamonds, getting caught, or dropping a boulder on the enemy sprite. All use the same (RANDOMIZE USR z) sound FX routine, but POKEing slightly different values into the code from BASIC (z+5, z+24 etc.) is making the sound different-sounding for each event.Stefan wrote: ↑Wed Apr 01, 2020 9:45 pm The code is initially poked into memory by line 6015 using the data from line 6030, this disassembles to:I'm not sure how this is returning to basic normally, but if you're running the listing in an emulator it shouldn't be hard to see.Code: Select all
dec b ; line 8599 changes this to 243 = di ld de,&0210 ; d changed by line 160 outer: ld h,1 ; h changed by line 160 and line 1510 ld a,(&5c48) ; border colour (https://skoolkid.github.io/rom/buffers/sysvars.html) rra rra rra inner: ld c,254 xor %00010000 out (c),a ld b,e wait: djnz wait dec h jr nz,inner inc e ; line 1510 changes this to 28 = inc e and then 29 = dec e dec d jr nz,outer ei
So since this is sending outs to port 254 and toggling bit 4, this is "obviously" some sort of sound effect routine, the parameters are tweaked by various basic lines before use.
For hand disassembly you may find http://clrhome.org/table/ useful.
Weirdly I never remember encountering many BASIC-with-machine-code type-in routines. I only realised later that they were fairly widespread. Must have been buying the wrong mags...
My Speccy site: thirdharmoniser.com
Re: Benny Bunny: Burrows (Boriel BASIC)
Thanks [mention]Stefan[/mention]