PicoGAME LCD: Handheld videogame


Author Message
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4090
Posted: 11:26am 25 Jul 2023      

Hi Volhout,

  Volhout said  Want a port of SNAKE ? or CIRCLE ?


Yes, but you are "jumping the gun" because as you say I haven't posted the necessary schematics yet, I'm waiting on having a "final" PCB.

Button allocation:

GP8 -  Down
GP9 -  Left
GP10 - Up
GP11 - Right
GP12 - Select
GP13 - Start
GP14 - B
GP15 - A


Which you could read into a bitmap x% like so:

x% = (Port(GP12,2,GP11,2,GP8,1,GP8,1,GP11,1,GP10,1,GP9,1,GP13,3,GP13,3) Xor &h7FFF) And &h29EA


And looking at that you are going to think "WTF has Tom been smoking?"

But there is method in my madness, the bits in x% then correspond to:

Const ctrl.START  = &h02
Const ctrl.SELECT = &h08
Const ctrl.DOWN   = &h20
Const ctrl.RIGHT  = &h40
Const ctrl.UP     = &h80
Const ctrl.LEFT   = &h100
Const ctrl.A      = &h800
Const ctrl.B      = &h2000


Which matches the codes returned by the CMM2 when reading the digital buttons from a Wii Classic controller - the closest thing we have to a documented MMBasic controller standard.

Best wishes,

Tom
Edited 2023-07-25 21:27 by thwill