Lady Bug

developing/porting a new game or gaming framework? post in here!
User avatar
baz4096
Posts: 210
Joined: Sat Apr 10, 2021 3:51 pm
Location: Baildon, West Yorkshire
Contact:

Re: Lady Bug

Post by baz4096 »

Final build? :)

Thank you very much for sharing your work on this. A really fascinating insight into the process, with the added bonus of a great game at the end :)
User avatar
lovebug
Posts: 814
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

baz4096 wrote:
Sun Oct 03, 2021 2:43 pm
Final build? :)

Thank you very much for sharing your work on this. A really fascinating insight into the process, with the added bonus of a great game at the end :)
thanks :D

im gonna leave this alone for now as its good enough but I may return to it at some point as I would like the game to be able to save its settings and high score/name and possibly add a high score table of the top 8 players

but for now i'll call this the final build lol
Image Image Image
User avatar
lovebug
Posts: 814
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

well would you belive it ! I only just discovered *fx 4 1 to disable those pesky cursor editing keys that can mess up my pretty loading screen :P

Build 002519 - added *fx 4 1 into !boot.asm to fix the double cursor issue if the cursor keys were pressed on the loading / instruction screens
 
ladybug.ssd
(34.5 KiB) Downloaded 16 times
source.zip
(464.08 KiB) Downloaded 6 times
Image Image Image
User avatar
lovebug
Posts: 814
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

Build 002520 - Removed an osbyte 144 (*tv 0,1) from .loaderStart in loader.asm that was leftover code from an older build and replaced it with osbyte 19
 
ladybug.ssd
(34.5 KiB) Downloaded 15 times
source.zip
(464.06 KiB) Downloaded 7 times
Image Image Image
User avatar
lovebug
Posts: 814
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

I thought I would give github desktop one more try and just reinstalled it

now it works fine and I can make changes, commit and push without issues .... strange that it never worked before !

so its on github at last https://github.com/LoveBug2084
Image Image Image
User avatar
lovebug
Posts: 814
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

i've been trying to get the beeb to reset cleanly without doing a lda#127:sta&fe4e power on reset simulation because im planning to store the game settings and a high score table for the top 8 players in sideways ram so that I can save them to disk when break is pressed but ive heard that a power on reset will clear the sideways ram on an acorn master compact :(

I tried many things for about 3 hours without any luck

while I was deep in the code I noticed 2 unused varibles from an old build so I removed them and i've also altered the instruction page text very slightly

the plan was to get this saving option working but I havent given up yet, hopefully i'll find a solution

Build 002529
 
ladybug.ssd
(35.5 KiB) Downloaded 7 times
source.zip
(470.34 KiB) Downloaded 5 times
https://github.com/LoveBug2084/LadyBug
Last edited by lovebug on Mon Oct 11, 2021 8:31 pm, edited 1 time in total.
Image Image Image
User avatar
tricky
Posts: 5832
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: Lady Bug

Post by tricky »

I have my high scores in the stack from I think &121..&1C3 or there abouts. It has been ok on what I have tested it on (DFS only) - I think!
I have a magic byte at each end and a dirty flag. When the game runs, if it finds a dirty table, it saves it or no table, it initialises it.
Carnival does this in basic and centipede in ASM iirc.
User avatar
lovebug
Posts: 814
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

tricky wrote:
Sat Oct 09, 2021 2:52 pm
I have my high scores in the stack from I think &121..&1C3 or there abouts. It has been ok on what I have tested it on (DFS only) - I think!
I have a magic byte at each end and a dirty flag. When the game runs, if it finds a dirty table, it saves it or no table, it initialises it.
Carnival does this in basic and centipede in ASM iirc.
Im not sure how you are getting the beeb to cleanly reset after filling its memory ?

i created a clone of ladybug project and have been doing some tests and im up to build 002572 now :lol:

originally i was hooking into break vector and storing 127 into fe4e and jmp (&fffc) and that worked fine for cleanly resetting the beeb but the issue is that the master compact clears the sideways ram on power up reset and im planning to store an 8 player high score table and game settings in the side ways ram

so what ive managed to come up with is this

loader now first saves 0200-02ff into sideways ram then loads ladybug and runs it
ladybug relocates itself and then grabs the copy of the sideways ram bank number detected by loader and stores it into the break reset code in the lower stack

upon pressing break the reset code pages in the sideways ram and jmps to a restore function in the sideways ram which restores 0200-02ff from the backup copy, writes zero to 0400-7fff, changes the break jump vector to the 2nd routine in the stack for saving and then does a jmp(&fffc)

the 2nd saving routine runs and pages in the sideways ram and does a jsr to the save function (which currently is just an rts) then restores the original sideways ram bank and returns to the os

phew, this works perfectly and cleanly resets the beeb

the issue i have now is that if adfs is present it does that checksum thing during reset and spits out the Bad sum error message

so now im thinking the only way to get passed the adfs error is to backup 0000-00ff and probably the whole adfs workspace too !
the only way i can do that is to use more sideways ram, im basically gonna be saving the state of the machine before ladybug runs and restore it back

i could detect if extra sideways ram is available and only then enable this mess for the saving feature

its getting a bit crazy !, all this madness because the master compact erases sideways ram on power up reset :(
Image Image Image
User avatar
tricky
Posts: 5832
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: Lady Bug

Post by tricky »

I reset same as you, but my highscore is in the stack, which doesn't seem to get reset.
You basically do SHIFT-ESCAPE to quit, reset, save and start up again.
I don't support BREAK as a way to exit and have never tried ADFS.
User avatar
lovebug
Posts: 814
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

i guess trying to use break on its own to save was a bad idea then :lol: :lol:
i'll put the game settings and just the single high score and name into the stack and save it on boot if it validates

gonna try this
Image Image Image
User avatar
lovebug
Posts: 814
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

well so far ive moved settings and highscore into the stack and written a validator that works
any changes made in the game or getting a highscore/ name generates a new validation byte

tomorrow i'll write the basic boot loader version of the validator to check the stack on boot and if valid save the data to the file else just load the current file

one thing im worried about is if the disk is read only , how do I detected it ?

if the basic saving routine is doing a *save settings ..... i'll get a disk read only error if its write protected

not sure what to do with that, any advice would be welcome

thanks
Image Image Image
User avatar
lovebug
Posts: 814
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

got it sorted 8)

build 002535 - added save feature
reboot the disk to save the game settings and high score
if you get a message saying unable to save highscore / settings its because the disk is write protected, remove the protection and boot the disk again
  
ladybug.ssd
(36.25 KiB) Downloaded 6 times
source.zip
(472.9 KiB) Downloaded 2 times
https://github.com/LoveBug2084/LadyBug

---- edit ----
github went nuts and I ended up with a merged mess for some reason ????
luckily I had already zipped the project so I deleted everything, pushed the blank project then upzipped the original files and pushed that onto github. i dont know why i have so many issues with this thing
Image Image Image
User avatar
lovebug
Posts: 814
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

build 002537 - Altered the write protected message
 
ladybug.ssd
(36.5 KiB) Downloaded 11 times
source.zip
(472.98 KiB) Downloaded 4 times
https://github.com/LoveBug2084/LadyBug
 
write protected 02.png
 
A big thank you to Tricky for making me realise that using the stack for storage and the beebs regular boot method was the way forward, And thanks to everybody for help and feedback during development. =D> =D> =D> =D> =D>

I think its done now but if you spot any program bugs then let me know thanks :D

Thinking about the next game.....
Image Image Image
User avatar
marcusjambler
Posts: 931
Joined: Mon May 22, 2017 12:20 pm
Location: Bradford
Contact:

Re: Lady Bug

Post by marcusjambler »

Its been an interesting journey lovebug =D> =D>
User avatar
lovebug
Posts: 814
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

marcusjambler wrote:
Tue Oct 12, 2021 3:25 pm
Its been an interesting journey lovebug =D> =D>
it has for sure

now I gotta think of something new to do, I had thought of making a beeb port of the nintendo micro mages but I gotta see if the original programmers would allow it

I made a mockup in mode 1 of a screenshot I took of the game to see what it might possibly look like

could be ok ?
 
original nintendo version
micro mages.png
 
bbc mode 1
micro mages bbc.png
Image Image Image
User avatar
tricky
Posts: 5832
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: Lady Bug

Post by tricky »

Your approach sounded much cleaner, I just wrote the smallest code I could that would be needed at runtime ;)
You could try a little stippling on the blue to time it down a bit - I am very bad at graphics ;)
User avatar
lurkio
Posts: 3789
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Lady Bug

Post by lurkio »

lovebug wrote:
Tue Oct 12, 2021 4:56 pm
bbc mode 1
micro mages bbc.png
Looks fantastic!

=D> =D> :D
User avatar
mlouka
Posts: 85
Joined: Wed Sep 27, 2017 4:57 pm
Location: Halden, Norway
Contact:

Re: Lady Bug

Post by mlouka »

Thanks for all your work on Lady Bug — it has been fun to follow your work and try it out as it has evolved. Has turned out beautifully. =D>
BBC Master 128, BBC Model B i7, PMS B2P-6502 2nd proc., PiTubeDirect (both internal and external), RetroClinic Multi-OS Selector, Sundby 256k RAM/ROM card, MMFS, Gotek, Music 500, ..
User avatar
lovebug
Posts: 814
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

Thanks
Image Image Image
User avatar
lovebug
Posts: 814
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

Image
 
The B+ and Master 128K are erasing the stack on a simulated power on reset and a *fx 200 2 reset so the high score / settings are lost ](*,) ](*,)
Last edited by lovebug on Wed Oct 13, 2021 6:57 pm, edited 1 time in total.
Image Image Image
User avatar
lovebug
Posts: 814
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

ive been single stepping the os roms, all fill different areas of ram with 0

0400-7fff Model B
0000-7fff Model B+
0000-dfff Master 128

B the data survives in the stack

B+ I could store the data in the 12K workspace ram and it would survive

Master 128 this machine is a real problem as it erases everything
I could possibly store the data in the RTC eeprom but thats kind of nasty and i dont even know how much of the 50 bytes of storage is remaining for the user

Master Compact im unable to test this as BeemEm doesnt support it
Image Image Image
User avatar
lovebug
Posts: 814
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

ok I thought of a solution that should work, its a pain but its not as bad as my previous thoughts

duplicate the B+ and Master 128 reset code into the workspace ram (B+) or sideways ram (master 128) both modified to not erase the stack

for the model B use the lda #127:sta &fe4e: jmp (&fffc) as thats fine for this model

for the B+ or Master 128 we page in the workspace or sideways ram and jmp to the modified reset code which clears the ram except the stack and then jumps back into the os to continue

I am unable to emulate the master compact so I wont be able to duplicate the reset code for now
Last edited by lovebug on Wed Oct 13, 2021 9:46 pm, edited 4 times in total.
Image Image Image
User avatar
lurkio
Posts: 3789
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Lady Bug

Post by lurkio »

lovebug wrote:
Wed Oct 13, 2021 6:40 pm
I am unable to emulate the master compact
I think BeebJIT emulates the Compact..?:

https://github.com/scarybeasts/beebjit

:?:
User avatar
lovebug
Posts: 814
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

lurkio wrote:
Wed Oct 13, 2021 6:59 pm
lovebug wrote:
Wed Oct 13, 2021 6:40 pm
I am unable to emulate the master compact
I think BeebJIT emulates the Compact..?:

https://github.com/scarybeasts/beebjit

:?:
thanks i'll take a look
Image Image Image
User avatar
tricky
Posts: 5832
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: Lady Bug

Post by tricky »

I'm really sorry, I was sure that I had tested that, but carnival was my first new game and have just assumed that it worked since!
Do the others also skip one byte per page?
User avatar
lovebug
Posts: 814
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

no worries tricky im happy to learn something

i was just thinking it gives me an excuse to move the settings into workspace/sideways ram and add that 8 player high score table :lol:

the bbc b+ skips the first byte of each page just like the model b
the master doesnt skip but after each page is zeroed it stores 40 @ 0d00 :lol: crazy programmers

were you thinking of storing data in the first byte of every page :D it would be a nightmare to spread a program out into 255 byte pages :shock:
Image Image Image
bob147
Posts: 26
Joined: Thu May 02, 2019 10:02 pm
Contact:

Re: Lady Bug

Post by bob147 »

I've just been trying this out and I think it's great. Really nice job giving it the classic arcade 'bright chunky graphics' look with the beeb palette.
User avatar
lovebug
Posts: 814
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

bob147 wrote:
Thu Oct 14, 2021 10:07 am
I've just been trying this out and I think it's great. Really nice job giving it the classic arcade 'bright chunky graphics' look with the beeb palette.
thanks :D
Image Image Image
User avatar
lovebug
Posts: 814
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

I wonder if I could ask a big favor ?

I would love to hear a sound recording from a real beeb if possible, I am interested in the munching sound ladybug bug makes when eating dots as the emulators I have tried all give different sounds from the noise/pulse channel and it would be nice to know what it really sounds like

I would be very grateful, thanks guys

I am hoping to get a master compact when one becomes available which will really handy for development of software and hardware :D
Image Image Image
User avatar
tricky
Posts: 5832
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: Lady Bug

Post by tricky »

Beebem just uses Rand() to generate white noise, so don't believe it, I can't remember which emulators reset the random seed when the noise frequency is set (as per HW).
Post Reply

Return to “new projects in development: games”