Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 05:18 21 Oct 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Game for PicoMiteVGA: Pico Frog

     Page 2 of 3    
Author Message
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1297
Posted: 11:48am 27 Aug 2025
Copy link to clipboard 
Print this post

just ignored overwritten the Keypress in the startscreen sub:
 Loop until inkey$=" " or rd_kb$()="A " or 1=1

EDIT:
I just tested it again in the B3 version, and now the screen freezes here too. It seems to be a fault with my Pico. When I have the patience, I'll unsolder it and replace it.
Edited 2025-08-27 22:08 by Martin H.
'no comment
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5356
Posted: 02:22pm 27 Aug 2025
Copy link to clipboard 
Print this post

Martin,

I have the b4 running endless on a 2040, and have spotted an error.
"too many nested loops" in the "flower" routine. So I expect there is something wrong now with the direct jump (goto !!) in the repeat routine.
This may take longer to happen in a 2350

Volhout
Edited 2025-08-28 00:29 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 666
Posted: 06:37pm 27 Aug 2025
Copy link to clipboard 
Print this post

Hi Harm,
I've got my new portable MMBasic console running and with the tip that Peter gave me about limiting resolution, it's running Pico Frog, with music at the correct speed, it would almost do it, at full screen, but once I limited it, it's now looking and sounding good.


The box is 3D printed, poorly :-( and the mini keyboard is wireless USB, obviously I'll use a proper keyboard for editing....
Internally it's based on Peters original V1.0 HDMIUSB board, but I've modified it to drive a ST7796S LCD, and incorporated a Lithium Battery charger/monitor, with 2X 18650 3Ahr batteries, as ballast down the bottom, so it'll run for quite a long time :-)

Anyway, as long as the resolution bodge continues to works ok, I should be able to test 240x320 or 480x320 games reasonably easily, plus I get a lot of lines in the editor, ;-) and now I can view lines longer than a screen width easily, it's very functional. :-)
Regards Kevin.
Next job is to swap the 2040 to a 2350 on my game*mite, easier said than done :-(
Edited 2025-08-28 05:14 by Bleep
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5356
Posted: 08:08am 28 Aug 2025
Copy link to clipboard 
Print this post

Kevin, Martin,

The endless run ending in an error "too deep nesting of SUB's" can be fixed by replacing

GOTO START
in line 212

with

RUN


Now I can look at fixing the problem with filling all 5 nests...

By the way, you really have a nice setup there. I like the battery operation. You do not need to use it, but you can in case it is needed. And the screen is big enough for some elementary editing. Different from a Game*Mite.

Volhout
Edited 2025-08-28 18:12 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5356
Posted: 10:26am 29 Aug 2025
Copy link to clipboard 
Print this post

@Martin,

Fixed the bugs in b4. The "white screen + lockup" in GameOver was most likely caused by a FRAMEBUFFER WRITE N (direct write to LCD) happening during a FRAMEBUFFER MERGE. I haven't seen it since I fixed that. So the game should play well now, including fly behaviour.

Here is b5. The only known problem is that at game over the highscore is lost. But that is easily fixed by a VAR SAVE, low prio...

picofrog_GM_6b5.zip

Volhout
Edited 2025-08-29 20:27 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1297
Posted: 12:32pm 29 Aug 2025
Copy link to clipboard 
Print this post

As I said, I don't have a Game*Mite at the moment. I had to destroy the old Pico to desolder it. Now, once I've cleaned the board, I'll put a socket on it and then I'll use a Pico 2. I'll probably do all this over the weekend. Thanks for your efforts, I'm excited to see how your new Version turns out.
Cheers
Martin
'no comment
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 666
Posted: 05:58pm 29 Aug 2025
Copy link to clipboard 
Print this post

Hi Harm,
I have now sucesfully converted my GameMite to a 2350, with a lot of solder suck, I even think the original 2040 is still working ;-)
Anyway, I've re-set it up a a GameMite, with added games, Flappy Bird etc. but also  including your latest PicoFrog and it's all working great. :-)
Thanks, Kevin.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5356
Posted: 08:26am 30 Aug 2025
Copy link to clipboard 
Print this post

Thanks for the update.
Good news that the surgery has worked out.
But (for my part) you would not need to make that change. I will make sure all Game*Mite games work on 2040. The 2350 may just run a bit smoother (or -like with picofrog- have slightly better music quality).

I hope Martin's fixing goes well also.

Volhout

P.S. For those expecting a VGA version in this thread. It will come, be patient, but I will iron out all problems and add additions to the Game*Mite version before upgrading the VGA version. For Game*Mite I have 2 enthusiastic beta testers :-)..So..patience...
Edited 2025-08-30 18:26 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5356
Posted: 07:31am 08 Sep 2025
Copy link to clipboard 
Print this post

All,

Please find attached version b6.
Version b6 was focussed on platform compliance.
Version b6 will run both VGA and Game*Mite and 9341 LCD equipped 2040 or 2350 platforms. It may also work on HDMI, but I cannot test that. There are simply to many platforms and one can only adopt 1 or 2, maybe 3.

picofrog6_b6.zip

Development plan:
b7             = implement WII (and maybe NES (*)) controllers for PicoGameVGA compliance
                then all envisioned platform compliance work should be finished.
b8 and further = work on additional game features (i.e. diving turtles/croco/levels).

Volhout

(*) Problem is that NES controllers are hard to auto-detect, as they where not designed by Nintendo with this in mind, and PicoGameVGA hardware is not helping in that perspective.
Edited 2025-09-08 17:37 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5356
Posted: 06:39pm 11 Sep 2025
Copy link to clipboard 
Print this post

All,

This is picofrog6_b7. b7 supports some controllers
- A WII classic controller connected to system I2C (either I2C or I2C2)
- A WII nunchuck controller connected to system I2C (either I2C or I2C2)
- A NES controller connected to GPIO pins GP1/GP2/GP3 as in PicoGameVGA and PicoGameHDMI boards.

Besides that keyboard control (PS2 or console) is possible. USB keyboard is not tested, but should work as well.

The Game*Mite uses it's own 8 keys to control the game.

The Game*Mite, NES and WII classic controller use the arrow keys and the A button
The nunchuck uses the joystick and the Z button to control the game.
Keyboard controls are cursor keys, and the space bar.

picofrog6_b7.zip

This game works on LCD and VGA

Volhout

P.S. in case the NES controller support confuses your PicoMite, there is a variable called no_nes% that can be set to 1 to skip all NES controller support.
Edited 2025-09-12 04:42 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 666
Posted: 08:19pm 12 Sep 2025
Copy link to clipboard 
Print this post

Hi Harm,
I'm using Pico Frog on a GameMite, but with a WII controler plugged in, so I've temporarily told the program it's not a GameMite by setting gm%=0.
However then the WII controler is not being recognised, dummy% is zero in sub find_wii, so for now I've made the case statement for dummy% look for 0 instead of &hA4200101 then everything works fine, I can play the game using the WII.
Just to be sure I temporarily added the lines below to find_wii

WII OPEN
Pause 100
?DEVICE(WII T)
WII CLOSE

and it did print &HA4200101, so the WII is working fine.
It looks to me like there is some problem with the way you are detecting the WII?
I am using I2C2, and I have checked that that is detected, which it is.
Regards, Kevin.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5356
Posted: 06:20am 14 Sep 2025
Copy link to clipboard 
Print this post

Kevin,

Could you please do a test for me ? In below section of the code:



Could you comment out lines 855 and 856, and increase the PAUSE to 100ms ?
Lines 855 and 856 are turning off encryption on the nunchuck, and in my case (with the clone classic controller I have) that works.

The classic controller encryption is turned off by line 835. But it may get confused by 855 and 856, -or- it needs another delay before requesting the ID.

Regards,

Volhout

P.S. just OPEN WII is sufficient for your test. When there is no controller identified it is shown in the error message. I tried using OPEN WII and OPEN NUNCHUCK WII but could not make it work automatic and transparent, hence I wrote a clumsy work around. That is not working for you yet.
Edited 2025-09-14 16:23 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5356
Posted: 06:45am 14 Sep 2025
Copy link to clipboard 
Print this post

Martin,

I compressed the requires sprites, and startend with implementing diving turtles when I realised picofrog Uses a different mechanism for the N layer than robots.
Much harder to make animations.

This Will require some deep thinking, or, a re-write of the N layer generation.

Anyway, a lot of work.

Volhout
Edited 2025-09-14 16:45 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 666
Posted: 09:34am 14 Sep 2025
Copy link to clipboard 
Print this post

Hi Harm,
Thanks for the pointers, with a bit of playing around I have got it to work, by removing the 2 lines you sugested, increasing the pause to 100 didn't make any difference, however adding an extra Pause 10 just after the second I2C2 Write, fixed it, as per the code below. I did try putting the 2 lines back, after I had added the  extra Pause, but that stopped it working again. As far as I know my controler is a genuine Wii controler, not a clone.
   Else
     'init device
     I2C2 write ad_wii%,0,2,&h40,&h00
     Pause 10
'      I2C2 write ad_wii%,0,2,&hF0,&h55
'      I2C2 write ad_wii%,0,2,&hFB,&h00
     'read id
     I2C2 write ad_wii%,0,1,&hFA
     Pause 10
     I2C2 read ad_wii%,0,6,wii_dat%()
   End If


I also noticed in this piece of code, in Case "I2C", you then do I2C2 Read, is this a copy and past error, or correct? the iic_wii% is being correctly set to 1 or 2.


 'find I2C port
 Select Case MM.Info(system i2c)
   Case "I2C2"
     iic_wii%=2 : I2C2 read ad_wii%,0,1,dummy%
     If MM.I2C=0 Then is_wii%=1  'we have a device at wii address
   Case "I2C"
     iic_wii%=1 : I2C2 read ad_wii%,0,1,dummy%
     If MM.I2C=0 Then is_wii%=1  'we have a device at wii address
 End Select


Regards, Kevin.
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1297
Posted: 10:58am 14 Sep 2025
Copy link to clipboard 
Print this post

  Volhout said   a lot of work.


Volhout,
  unlike with robots, only the newly added objects are drawn on the N layer outside the visible area . The rest are simply scrolled. The individual tracks are treated only as strips, not as sprites. The difference between road and river here is that the movement of the stripes on the river affects the player's position
Ladyfrog can still be moved on the L layer, just like the player himself, but if you want to animate objects within the strips, you have to “track” them specifically and replace that part of the strip with new sprites, or you have to develop a completely new strategy.
Cheers
Martin
Edited 2025-09-14 21:07 by Martin H.
'no comment
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4096
Posted: 01:02pm 14 Sep 2025
Copy link to clipboard 
Print this post

The

Case "I2C" with I2C2 read ...

does look like a typo.

John
 
dddns
Guru

Joined: 20/09/2024
Location: Germany
Posts: 630
Posted: 04:42pm 14 Sep 2025
Copy link to clipboard 
Print this post

Hello Bleep,

your work looks really fantastic!

Regards
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5356
Posted: 06:15am 15 Sep 2025
Copy link to clipboard 
Print this post

Thanks Kevin, that is very helpfull.
I will make related changes.

Volhout
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5356
Posted: 04:40pm 15 Sep 2025
Copy link to clipboard 
Print this post

Kevin,

Could you please try this version. It should solve your problem. I confirmed it works on my genuine white nunchuck (*) and wii classic clone.

You will have to set gm%=0 manually,


picofrog6_b7_bf_kevin.zip


Volhout

(*) after some reading on the web, it may also solve the problem with black nunchuck's since these adhere also the the same protocol as the classic. The white ones apparently are different.
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5356
Posted: 11:12am 19 Sep 2025
Copy link to clipboard 
Print this post

Please find attached "demo" version.

It is just to demonstrate crocodiles, diving turtles, and fixes a bug in WII classic detection.

Crocodiles: you can walk over body, but not head and tail.
Diving turtles : for now you can still step on them, even when under water.

Again, it is just a demo.

picofrog6_b8_4.zip

I am running out of sprites. Otherwise I would also work on the "snake" and bring back lady-frog and animate the crocodile. We'll have to do with what we have for now.

EDIT: nay, we have 64 sprites (not 32), so now I can go completely wild...

Volhout
Edited 2025-09-19 21:33 by Volhout
PicomiteVGA PETSCII ROBOTS
 
     Page 2 of 3    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025