PicoMite V6.00.02 release candidates - all versions


Author Message
Volhout

Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 6171
Posted: 12:08pm 08 May 2025      

  mozzie said  G'day,

Volhout, hopefully this will help to diagnose your Wii controller / I2C issue.
I do not have a Wii controller but a PICOmite thats pretending it is one.

Peter, not sure if you are already working on this, you did mention a possible problem with the SDK...
I think there may be a problem with the background or transfer software for the Wii I2C system. It seems the I2C return data from the Wii is working its way up through memory until it over-writes something terminal.
Please see the photo below, the "WII" is incrementing byte 2 in the return variable and it is there in the pixel data, return data is &h0A,&h40,&hXX,&h00,&hFF,&hFF
Possibly the array address is not being reset and is continuing to increment? this where it goes over my head...

This is the code running on a HDMIUSB V6.00.02rc23

Option default integer
Option explicit
Option console serial

Wii open
Timer = 0
CLS

Do
Print DEVICE(wii ry), MM.I2C, Int(Timer / 1000)
Text 0,0,Str$(Int(Timer/1000))
Pause 500
Loop

End

This is what is on the screen, the number in the corner is seconds from Program start:





The "data" appears first, then coloured tiles, then coloured bars before it locks up (Mode 1), this was different runs. Starts at top left and works across and down.

This is fom the "Wii" PICO, it shows the lock up at approx 20mins every time.

> run
A420 0101 Sent   0
started @ 02:34:44
failed @ 02:54:34
> run
A420 0101 Sent   0
started @ 02:54:55
failed @ 03:14:31
> run
A420 0101 Sent   0
started @ 03:14:55
failed @ 03:34:27
>

> option list
PicoMiteHDMI MMBasic USB RP2350A Edition V6.00.02RC23
OPTION SERIAL CONSOLE COM2,GP8,GP9
OPTION SYSTEM I2C GP20,GP21
OPTION FLASH SIZE 4194304
OPTION COLOURCODE ON
OPTION KEYBOARD US, 0, 0, 600, 150
OPTION RESOLUTION 720x400 @ 283200KHz
OPTION DISPLAY 33, 90
OPTION SDCARD GP22, GP26, GP27, GP28
OPTION AUDIO GP10,GP11', ON PWM CHANNEL 5
OPTION RTC AUTO ENABLE
OPTION PLATFORM HDMIUSB
>

Hopefully this provides some diagnostic information, rc20 and rc21 are same.

Thanks again for all the work you put in to this, it is much appreciated.

Regards,
Lyle.


Hi Lyle,

Thanks for confirming. I have analyzed the I2C communication, and have to re-confirm that all I2C communication is sound. There is no corrupted packets, and the WII Classic response is consistent until the breakdown of the pico. I am testing on a 2040, and the problem shows after 9.2 minutes (between 9.3 and 9.1). Also with corrupted VGA screen.

I tend to agree with you that it looks like the I2C buffer is exceeding it's boundaries, and is writing into VGA screen memory, or some in between screen buffer (because in my case, 30 seconds before crash, there is a clear of the VGA screen, then the program runs fine for another 10 seconds, then corrupted data is shown on screen.)

Tonight I plan to run the program with display of mm.info(system heap) and mm.info(stack). I already know it is not heap, but I did not check system heap.

The RTC on auto mode, also accesses the same I2C bus. And I was afraid for a bus conflict. But in my testing it shows that the RTC is read after power up immediately, and then after 1 hour. But the system crashes at 9 minutes already, so I think that is not the issue here. But it could be something to verify anyway.

Volhout
Edited 2025-05-08 22:12 by Volhout