Lady Bug
Re: Lady Bug
You might want to leave it for a few months and come back to it later with a fresh pair of eyes.
Take your mind off it by creating a new game instead
Take your mind off it by creating a new game instead
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad
Re: Lady Bug
Build 003338
(fixed) im now clearing player input when a level restarts after ladybug dies as it was possible for ladybug to turn the wrong way when the level restarts due to the previous pending player input
(fixed) missing pixels in enemy set 1
(change) altered the colors a little in boot.bas instructions
(change) [Conf] [ConfR] [Maps] [Maze1] [Maze2] [Maze3] renamed to _Conf _ConfR _Maps _Maze1 _Maze2 _Maze3
(fixed) im now clearing player input when a level restarts after ladybug dies as it was possible for ladybug to turn the wrong way when the level restarts due to the previous pending player input
(fixed) missing pixels in enemy set 1
(change) altered the colors a little in boot.bas instructions
(change) [Conf] [ConfR] [Maps] [Maze1] [Maze2] [Maze3] renamed to _Conf _ConfR _Maps _Maze1 _Maze2 _Maze3
Last edited by lovebug on Sun Oct 02, 2022 11:22 pm, edited 4 times in total.
Re: Lady Bug
true
Re: Lady Bug
@maniac miner I really must thank you for this comment,the automatic frameskip does make the game look like its slowing down and it got me thinking about the problem and I think I have found a solutionmaniacminer wrote: ↑Tue Aug 30, 2022 1:27 amonly a slight slowdown when all the nasties are patrolling at full whack.
In all builds so far this is how the frameskip functioned
The screen is split into two halves (upper and lower) and in each half up to 3 sprites can be drawn within 1 frame at 50Hz
If more than 3 sprites appear in a half screen then the extra sprites will be postponed until the next frame which causes the update rate for those sprites to be 2 frames (25Hz)
This automatic frameskip was applied to ladybug and enemies both
In this new build I have altered the sprite processing code in .redrawSprites so that ladybug is given priority and will always be drawn within 1 frame at 50Hz without frameskip, only enemies will have frameskip applied when needed so this should make things look smoother
Build 003340
Re: Lady Bug
ERROR! this is completely wrong, please ignore !
I removed ladybug from the auto frameskip in the previous build but I forgot to reduce the sprite processing length by 1 so the .redrawSprites was still trying to process 5 sprites instead of just the 4 enemies, fixed now
Build 003341
I removed ladybug from the auto frameskip in the previous build but I forgot to reduce the sprite processing length by 1 so the .redrawSprites was still trying to process 5 sprites instead of just the 4 enemies, fixed now
Build 003341
Last edited by lovebug on Sun Oct 09, 2022 7:53 am, edited 2 times in total.
Re: Lady Bug
ERROR! this is completely wrong, please ignore !
hmm I noticed that theres an issue with the enemy movement not looking smooth so I slowed the game down in beebem and can see that even when theres only 1 active enemy that its being drawn for 3 frames and then skips 1 frame
looking into the issue
hmm I noticed that theres an issue with the enemy movement not looking smooth so I slowed the game down in beebem and can see that even when theres only 1 active enemy that its being drawn for 3 frames and then skips 1 frame
looking into the issue
Last edited by lovebug on Sun Oct 09, 2022 7:53 am, edited 1 time in total.
Re: Lady Bug
Build 003340 is correct and wasnt skipping a frame
I have recorded video and single frame stepped the game and its seems ok, please use 003340 thanks
Im still not sure what was causing the issue but it seems ok now
viewtopic.php?p=372315#p372315
Build 003341 is incorrect and has been deleted
Sorry guys
---- edit ----
Actually it was probably me poking around with things late at night and half asleep then thinking it was the build I had just posted
I have recorded video and single frame stepped the game and its seems ok, please use 003340 thanks
Im still not sure what was causing the issue but it seems ok now
viewtopic.php?p=372315#p372315
Build 003341 is incorrect and has been deleted
Sorry guys
---- edit ----
Actually it was probably me poking around with things late at night and half asleep then thinking it was the build I had just posted
Re: Lady Bug
I just discovered an error in beebem's 6502 core
the SED (set decimal) and CLD (clear decimal) instructions are not clearing the carry and this is causing ladybug to give an extra 10 points on some items
you can test this with
answer should be 0
---- edit ----
ignore this, the information on 6502 im using is wrong
time to fix ladybug !
the SED (set decimal) and CLD (clear decimal) instructions are not clearing the carry and this is causing ladybug to give an extra 10 points on some items
you can test this with
Code: Select all
DIM C% 100:P%=C%:[SEC:SED:LDA#0:ADC#0:CLD:RTS:]:PRINT USR C% AND 255
---- edit ----
ignore this, the information on 6502 im using is wrong
time to fix ladybug !
Re: Lady Bug
Build 003343 fixed missing clc instructions in the bcd math routines
this is kind of annoying because I originally had clc instructions but removed them after reading a dodgy 6502 datasheet that showed the sed and cld instructions also clear the carry
well that datasheet is now burning in silicon hell
this is kind of annoying because I originally had clc instructions but removed them after reading a dodgy 6502 datasheet that showed the sed and cld instructions also clear the carry
well that datasheet is now burning in silicon hell
Re: Lady Bug
i just checked back on my old builds and up to build 003333 i had the clc instrructions, build 003334 i had removed them because of that crappy 6502.txt file i was using from some random bbs backup. sorry guys
im going to stick with this reference from now on
im going to stick with this reference from now on
- Attachments
-
- 6502.pdf
- (103.77 KiB) Downloaded 36 times
Re: Lady Bug
I know I've shared this somewhere, but this is my little cheat sheet that I have on my desk, stuck to a piece of porridge box!
I can't guarantee that it is correct as I only occasionally look at what can be ,x and ,y when I forget!
I just had a look and thought that I had missed SEV, but it seems that there isn't one!
It is 6502 only, no undocumented/illegal opcodes.
Warning!
TobyLobster has stopped a mistake in branch timing when crossing a page.
I can't guarantee that it is correct as I only occasionally look at what can be ,x and ,y when I forget!
I just had a look and thought that I had missed SEV, but it seems that there isn't one!
It is 6502 only, no undocumented/illegal opcodes.
Warning!
TobyLobster has stopped a mistake in branch timing when crossing a page.
- Attachments
-
- Tricky 6502.pdf
- (81.87 KiB) Downloaded 43 times
-
- Tricky 6502.doc
- (75 KiB) Downloaded 19 times
Last edited by tricky on Thu Oct 13, 2022 3:28 pm, edited 1 time in total.
Re: Lady Bug
thanks tricky, very handy
the 6502.pdf I just posted is from the acorn atom user manual
the 6502.pdf I just posted is from the acorn atom user manual
Re: Lady Bug
I usually keep a browser tab open with https://www.masswerk.at/6502/6502_instruction_set.html
0xC0DE
"I program my home computer / Beam myself into the future"
Follow me on Twitter
Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
"I program my home computer / Beam myself into the future"
Follow me on Twitter
Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
- TobyLobster
- Posts: 618
- Joined: Sat Aug 31, 2019 7:58 am
- Contact:
Re: Lady Bug
Tricky: I think branches take 4 cycles to branch to a new page don’t they (not 5 as your pdf shows)?
0xC0DE: I use that same page.
0xC0DE: I use that same page.
Re: Lady Bug
Build 003345 I just managed to squeeze in an indication of the diamond bonus available in the lower panel just below the lives value, disapeers if you die, collect non-cyan objects or get the diamond bonus
Last edited by lovebug on Tue Oct 18, 2022 3:17 pm, edited 1 time in total.
Re: Lady Bug
I couldnt do a more fancy looking indicator as the game is totally out of memory now
Sorry
Sorry
Re: Lady Bug
oh it turns out that I had loads of free space in the sideways ram but due to a mistake in loader.asm and memory.asm (and my lack of skill when it comes to math) it was reporting incorrectly
i'll work on making a nice sparkly diamond sprite and the code to display it
i'll work on making a nice sparkly diamond sprite and the code to display it
Re: Lady Bug
Build 003346
Added sparkly diamond bonus available tiles and code replacing the previous
Fixed yet another memory report error this time in build.asm
Altered the map editor tiles to better show the end pieces
Added a long overdue thank you to the github readme.md
Added sparkly diamond bonus available tiles and code replacing the previous
Fixed yet another memory report error this time in build.asm
Altered the map editor tiles to better show the end pieces
Added a long overdue thank you to the github readme.md
Code: Select all
A big thank you to
Kieranhj for their image2mode7 utility allowing me to make the lovebyte loading screen
Dreamland Fantasy's for their image2bbc utility allowing me to make the maze editor tiles
HeadHunter for recreating the enemy release sound for 50Hz using math !
And to everyone at the stardot forums for their kind words, help and support
Re: Lady Bug
Build 003347 fixed a mistake
vegetable bonus score update
when vegetable bonus score is displayed it draws over the center enemy box, when the score is removed I was drawing the two vertical bars of the enemy box but if a player creates their own map that didnt contain a center box then this action is incorrect
fixed it by reading the tileMap background buffer and drawing the correct content
vegetable bonus score update
when vegetable bonus score is displayed it draws over the center enemy box, when the score is removed I was drawing the two vertical bars of the enemy box but if a player creates their own map that didnt contain a center box then this action is incorrect
fixed it by reading the tileMap background buffer and drawing the correct content
Re: Lady Bug
Build 003348
A while back i modified boot.bas so that the instructions page in the basic $.Boot showed the user defined keys
One thing that bugged me about the instruction pages is that the information about extra lives, special bonus, diamond bonus were hard coded into the page which will be incorrect if someone reassembled the game and altered these constants for more lives etc
To fix this ive added an extra file bonus.asm which sets up the constants in memory which is then saved by build.asm to $._Bonus so that the $.Boot can read the values and display the correct information in the instruction pages
A while back i modified boot.bas so that the instructions page in the basic $.Boot showed the user defined keys
One thing that bugged me about the instruction pages is that the information about extra lives, special bonus, diamond bonus were hard coded into the page which will be incorrect if someone reassembled the game and altered these constants for more lives etc
To fix this ive added an extra file bonus.asm which sets up the constants in memory which is then saved by build.asm to $._Bonus so that the $.Boot can read the values and display the correct information in the instruction pages
Re: Lady Bug
Final Build 003350
ages ago I noticed that when redefining the keys in the lady bug menu when using jsbeeb emulator that the turnstile sound was incorrect for the first 3 keypresses but the final key sounded ok, strangely all 4 key presses sounded ok in beebem
I just discovered the cause was down to the function .keyboardScan which was setting via1 porta ddr bit 7 as input for the keyscan but wasnt setting it as output for the psg before exiting which caused sound data corruption from the missing bit 7
fixed now so final build again
ages ago I noticed that when redefining the keys in the lady bug menu when using jsbeeb emulator that the turnstile sound was incorrect for the first 3 keypresses but the final key sounded ok, strangely all 4 key presses sounded ok in beebem
I just discovered the cause was down to the function .keyboardScan which was setting via1 porta ddr bit 7 as input for the keyscan but wasnt setting it as output for the psg before exiting which caused sound data corruption from the missing bit 7
fixed now so final build again
Last edited by lovebug on Wed Jan 18, 2023 8:50 pm, edited 4 times in total.
Re: Lady Bug
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad
Re: Lady Bug
wow I just spotted a silly mistake in the function that draws 4 random enemies on the main menu screen
in .mainMenuDrawEnemies I call .random at the start to get the first random enemy and direction from randomSeed + 1 and randomSeed
but in the loop I do this
well this is very bad because if by chance the seed contained &FCFC when entering this function the seed would end up set to &0000 on exit after drawing the the 4 enemies and thats game over for the random number generator, this would cause the game to lockup completely as .random would only generate an infinite string of 0's
ive fixed this silly mistake by using a copy of the seed keeping the original safe
theres been a few other things like optimizations, allowing the last dot munch sound to play fully before ending the level, a new clear screen function for the map editor and more... check out the github repo history for details
Lady Bug Build 003351
in .mainMenuDrawEnemies I call .random at the start to get the first random enemy and direction from randomSeed + 1 and randomSeed
but in the loop I do this
Code: Select all
inc randomSeed ; increment direction for next sprite
inc randomSeed + 1 ; increment sprite image for next sprite
ive fixed this silly mistake by using a copy of the seed keeping the original safe
theres been a few other things like optimizations, allowing the last dot munch sound to play fully before ending the level, a new clear screen function for the map editor and more... check out the github repo history for details
Lady Bug Build 003351
Re: Lady Bug
ive always wondered why the sprites flicker when crossing the center line threshold between the lower and upper half of the screen
I think I found it, well it seems to work
I havent seen any side effects from this change
Build 003353
I think I found it, well it seems to work
I havent seen any side effects from this change
Build 003353
Re: Lady Bug
I did spot two side effects with the recent change, the cursor box and ladybug on the high score name registration screen flickered so ive fixed that
Build 003356
Build 003356
Last edited by lovebug on Fri Jun 09, 2023 9:36 pm, edited 1 time in total.
- marcusjambler
- Posts: 1147
- Joined: Mon May 22, 2017 12:20 pm
- Location: Bradford
- Contact:
Re: Lady Bug
Congrats