![]() |
Forum Index : Microcontroller and PC projects : PicoMite VGA :just a little test
![]() ![]() |
|||||
Author | Message | ||||
Martin H.![]() Guru ![]() Joined: 04/06/2022 Location: GermanyPosts: 1173 |
Thats why I wrote "Pico2" ![]() Edited 2025-02-18 04:57 by Martin H. 'no comment |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4715 |
Hi Martin, The issue with Kong on 6.00.02b11 is most likely the sheer size of the heap/free RAM. I wrote a simple "play modfile, play stop, play flac" and printed heap size. You can clearly see that 6.00.02 has 4kbyte less heap. And AFAIK, there is no memory leak, memory is returened with PLAY STOP. v5.09.00rc5 > RUN 101632 heap 76800 play mod 101632 play stop 58368 play flac 101632 play stop 76800 play mod 58368 play stop:play flac v6.00.02b11 RUN 97536 4kbyte Heap less 72704 97536 54272 97536 72704 54272 That is also shown if you type "memory" in both PicoMite versions (124k versus 128k RAM). That should at explain why Kong does not run on 6.00.02. Playing FLAC uses 42kbyte heap Playing MOD uses 24kbyte heap So playing FLAC may not be the best option here. Is there any way you can convert the FLAC to MOD ? Volhout EDIT: so PLAY FLAC combined with FRAMEBUFFER L uses 80kbyte RAM/heap of 97 available in 6.00.02b11. Only thing to become more efficient is use fewer strings, fewer arrays (these eat heap) and use more normal variables (are in the 28k reserved RAM area, not heap). Edited 2025-02-25 01:17 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4715 |
Martin, I can also confirm there is no memory leak with sprite write, an sprite read. Also mirroring does not change heap level. So it is pure heap size that has been 4kbyte les in 6.00.02. Volhout PicomiteVGA PETSCII ROBOTS |
||||
Martin H.![]() Guru ![]() Joined: 04/06/2022 Location: GermanyPosts: 1173 |
No, just recreating the "song" to a new MOD So I have to try to replay the original melody exactly in time.The problem only seems to occur with the last song (Endgame). 'no comment |
||||
Martin H.![]() Guru ![]() Joined: 04/06/2022 Location: GermanyPosts: 1173 |
Harm, I splitted the Endgame flac in two parts, So heap should work now. Please test Cheers Martin Kong.zip 'no comment |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 9796 |
The size of the flac file has no impact on memory usage |
||||
Martin H.![]() Guru ![]() Joined: 04/06/2022 Location: GermanyPosts: 1173 |
Thank you, I just tested it on the beta just released Pico2 HDMI Firmware without issues. So even if it doesn't help, it doesn't hurt either Edited 2025-02-26 21:22 by Martin H. 'no comment |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4715 |
Cannot test, currently traveling. Volhout PicomiteVGA PETSCII ROBOTS |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4715 |
Kong_h03.zip Martin, Using b14 on 2040 VGA/PS2, this is (very very pre-mature) mario walking/climbing, control from arrow keys. Jumping left/right with control-arrow. I use option keyboard us,0,0,0,0 for a bit of smooth movement. Now I have to dig through your code to find coordinates of ramps/ladders/objects, so I know when to fall/die. And then try to compact the code (a lot is copy/paste, and could be combined). Volhout Edited 2025-03-01 22:24 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Martin H.![]() Guru ![]() Joined: 04/06/2022 Location: GermanyPosts: 1173 |
Volhout The Board for every Level is stored at the brd(x/8,y/8) array,this help to see the ramps/ladders and also help the barrels to deside to take the ladder( not jet implemented). The slightly slanted platforms are only in the 1st board. I added Sound to the movement Kong_h03a.zip Thank you Cheers Martin Edited 2025-03-02 01:08 by Martin H. 'no comment |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4715 |
Martin, I guess the best way to implement movement is fixed sequences, agreed .? So a single left arrow uses a sequence of 2 sprites, and moves 8 pixels(the game grid).And a single jump button press starts a sequence of 8 sprite moves and goes 32 pixels. So no stopping the sequence halfway, only with a collision. Agree. Volhout Edited 2025-03-02 03:16 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Martin H.![]() Guru ![]() Joined: 04/06/2022 Location: GermanyPosts: 1173 |
Agree Very good suggestion, especially when a character jumps, Similarly (not yet real implemented), a status is also missing, “Kong throws the barrel or the barrel is thrown” which also lasts for minimum 3 states in the loop passes. Depending on the level, we have different sprites that behave differently. My idea was that we set a maximum number of sprites (8 to 10) on the screen at the same time. In the original game, you can see that barrels that are below Mario leave the level to the side and don't roll all the way down, for the same reason. All the sprites shown are moved in a loop and their type determines their movement. I then have to find out how often Mario is called compared to the other sprites in order to make the game “fair” Thank you for your support Cheers Martin Edited 2025-03-02 04:44 by Martin H. 'no comment |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4715 |
Martin, These are the basic movements in fixed sequences. Press arrow keys, and space to jump (jump in walking direction). Next I will look into integrating this onto the game field you created. I am using individual variables as much as possible (no arrays) to avoid heap usage, Regards, Volhout Kong_h04.zip PicomiteVGA PETSCII ROBOTS |
||||
Martin H.![]() Guru ![]() Joined: 04/06/2022 Location: GermanyPosts: 1173 |
looks nice, for the movement on the first board, the Mario y movement is unfortunately not exactly on the 8 Picel grid. More like the y calculation for the barrels. 'fall down at the end of plank? a scan takes place here to determine when there is no longer a black pixel under the spriteDo If Pixel(6+bx*4,by+10)=0 Then Inc By Else Exit Do End If Loop 'no comment |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4715 |
Martin, Just a heads-up. I have Mario walking the 1'st level. Do not change the colors used on the ramps since these are used for Mario's position. The only observation so far is that the ladders are off-grid (8 x 8px). But actually, that is kind of funny. You climb the ladder off-centre. Next is collision detection with the barrels. After that Mario falling down. And Mario climbing from ladder to ramp (sprites ani). And maybe a "jump-up" to cross broken ladders. What do you want with the oil barrel (fire). Should Mario walk in front of it, or should this be a road block ? Volhout Edited 2025-03-04 17:44 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Martin H.![]() Guru ![]() Joined: 04/06/2022 Location: GermanyPosts: 1173 |
Sounds good that schouldn't be possible. so Barrels can roll down a broken ladder but Mario can't climb the broken ladder, just up to the gab. you can Play the arcade Version online.. here Mario can run behind the oil barrel. I also found other online versions (reprogrammed), where Mario moves in Front of it ![]() So I don't think it makes any difference to the gameplay. cheers Martin 'no comment |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4715 |
Hi Martin, Still a lot to do, but level 1, Mario can reach the top if you are fast. You can climb ladders, avoid barrels (jump with space, -or- wait standing halfway a ladder). This level the "falls" are so small I did not want to kill Mario over it. You may disagree. It was quite a fight to work with these ramps, moving Mario up and down pixels) To do: a nice death, and start with new life if any left. To do: once you reach the top...what then... To do: the game is too short, barrels run out to fast. To do: animate Kong to throw barrels.... To do: barrel stack get's lower To do: damsel in distress must cry for help.... Well, the next level will have transport belts, so Mario must move left-right in pixels. New challenge. Have fun.. Volhout Kong_h06_bf.zip P.S. took quite a while to find out that the barrels Y coordinate is in pixels, and the x coordinate in pixels*4. EDIT: updated bugfix . . Edited 2025-03-12 17:42 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Martin H.![]() Guru ![]() Joined: 04/06/2022 Location: GermanyPosts: 1173 |
I love it ![]() show the Heart above between Mario and Peach. Play Stop: Play flac "audio/finish-board.flac", Pause 2 Seconds ![]() delete peach, replace the Heart with the broken Heart then use the Kong climb animation to move Kong and Peach out of the screen. the Animation of Mario rotating is Sprite 8 9 10 11 ![]() ps:I miss the Fall sound (finish-level.flac) at the end screen Edited 2025-03-14 20:00 by Martin H. 'no comment |
||||
![]() ![]() |
![]() |