Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 13:29 26 Nov 2024 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 : Colour Maximite 1.5? or something

     Page 6 of 13    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9115
Posted: 05:31pm 31 Jan 2024
Copy link to clipboard 
Print this post

  Quote  Unless the RP2040 is suddenly blessed with a lot more RAM I suspect it's not possible.  :



I've already had to reduce program size to cater for the RAM usage for the number of endpoints needed for 4 HID devices. I will not be supporting anything other than HID. Why do we need lots of I/O pins on a "retro" computer?

And, by the way, the TinyUSB host firmware is far from robust with hubs and multiple devices so expect operational limitations
Edited 2024-02-01 03:33 by matherp
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2350
Posted: 08:36pm 31 Jan 2024
Copy link to clipboard 
Print this post

hi Peter,
   in a few months time there may well be a blessing of more RAM, in the form of an RP2x50...

you have done a sterling job getting to where things are now, and we do all appreciate it.

i've never really regarded the picomite as a 'retro computer' myself, but rather as more of an instrumentation controller. for that task, I/O functionality is important, hence my never-ending hints about moving peripherals away from the onboard GPIO pins and onto a separate I/O controller of some sort such as the HID2CDC.

at the same time, others are more interested in the picomite as a 'retro' games machine, while i am sure others have even more diverse ideas.


cheers,
rob   :-)
 
swoodgate

Newbie

Joined: 24/11/2011
Location: Australia
Posts: 14
Posted: 07:57am 01 Feb 2024
Copy link to clipboard 
Print this post

  robert.rozee said  
   in a few months time there may well be a blessing of more RAM, in the form of an RP2x50...


You may get what you want, Eben Upton said this recently

"We know what people don't like about 2040, the M0+ could have more RAM, could have more GPIO and we know what people do like — the PIO"

Regards,
Steve
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6787
Posted: 08:11am 01 Feb 2024
Copy link to clipboard 
Print this post

The standard PicoMite is probably a better choice for instrumentation work, especially with a touch LCD display, which can replace just about all user controls and displays. If you prefer something with a bigger display then you could use a second Pico connected over a serial link. That would also add to the IO count. You could even run with a VGA monitor and touch screen controls then. If you can accept the security issue, you can also display to the console, sending ANSI control codes for screen layout etc. You get to keep more IO pins.

The PicoMite VGA by itself isn't a great choice for this job. There's not enough IO and you have to have some sort of keyboard (keyboards are always a pain in industrial settings. They tend to get expensive and/or frequently replaced.)

I'm not a fan of using USB for IO. It adds layers of complexity that you don't need. A simple I2C connection is fine for local expansion and you have full control over your chosen protocol. Multi=drop RS232 or RS485 are good for long distances. The original Colour Maximite had a firmware version that supported CANbus.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6787
Posted: 08:17am 01 Feb 2024
Copy link to clipboard 
Print this post

  swoodgate said  
  robert.rozee said  
   in a few months time there may well be a blessing of more RAM, in the form of an RP2x50...


You may get what you want, Eben Upton said this recently

"We know what people don't like about 2040, the M0+ could have more RAM, could have more GPIO and we know what people do like — the PIO"

Regards,
Steve



People also like the cost. It's incredibly cheap, especially when bought by the reel. It's all well and good increasing RAM etc., but if it increases the price much then people will continue to work round the RP2040 limitations rather than spend more. They hit a good balance with this chip. Any future version is going to have to offer something that's really special if it's going to do any better.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9115
Posted: 08:21am 01 Feb 2024
Copy link to clipboard 
Print this post

  Quote  "We know what people don't like about 2040, the M0+ could have more RAM, could have more GPIO and we know what people do like — the PIO"


A decent ADC would be good too!!!
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6787
Posted: 08:29am 01 Feb 2024
Copy link to clipboard 
Print this post

Oh yes - the only real problem with the RP2040, if you can manage with the RAM.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2350
Posted: 08:40am 01 Feb 2024
Copy link to clipboard 
Print this post

  Mixtel90 said  The standard PicoMite is probably a better choice for instrumentation work, especially with a touch LCD display, which can replace just about all user controls and displays.


not quite sure what use a touch screen and 'user controls' (GUI?) have to do with a instrumentation controller. i'm talking about something that is highly deterministic, upon which the operator writes ad-hoc code to control banks of test equipment configured for carrying out a test or experiment before moving on to using the setup for something else.

have a look at the likes of the HP-85 and later variants. they perform tasks that a modern multi-tasking operating system simply can not be relied upon to handle, with HP BASIC a popular language choice even today.


cheers,
rob   :-)

Footnote added 2024-02-01 19:00 by robert.rozee
for more info on HP's 80 series see:
https://www.hpmuseum.org/hp85.htm
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2350
Posted: 08:56am 01 Feb 2024
Copy link to clipboard 
Print this post

  matherp said  
  Quote  "We know what people don't like about 2040, the M0+ could have more RAM, could have more GPIO and we know what people do like — the PIO"


A decent ADC would be good too!!!


      yes, they really dropped the ball there! i'd also like to see them make some changes to the onboard switching PSU - some may even argue that the pico would be better off with just a simple linear regulator.


cheers,
rob   :-)
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6787
Posted: 09:10am 01 Feb 2024
Copy link to clipboard 
Print this post

Ah, I misunderstood. I come from a background of industrial control, where "instrumentation" is generally to do with sensors in the plant. The "user" has no access to how that side works at all - it's protected from him/her.

Of course, getting GPIB to work on a PicoMite might be a challenge. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2350
Posted: 10:04am 01 Feb 2024
Copy link to clipboard 
Print this post

  Mixtel90 said  Of course, getting GPIB to work on a PicoMite might be a challenge. :)


Super Easy, Barely an Inconvenience  

one regular forum member raised the possibility some 10 years back as their very first posting on here:
https://www.thebackshed.com/forum/ViewTopic.php?TID=5438

and since then it has been discussed a few times. numerous GPIB to serial bridges have been built over the years using arduinos, and work exceptionally well. so all one needs for that is an arduino and a spare serial port - or a USB port that supports CDC. but a serial port will do!


cheers,
rob   :-)
 
zeitfest
Guru

Joined: 31/07/2019
Location: Australia
Posts: 482
Posted: 11:26am 01 Feb 2024
Copy link to clipboard 
Print this post

ah yes... sometimes still at industrial auctions, you can see a stack of instrument components all hanging off the HPIB bus (ancestor). They will include a NT4 box for the controller as well - "all it needs is a new motherboard"     .
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6787
Posted: 11:41am 01 Feb 2024
Copy link to clipboard 
Print this post

Looks like you're sorted then. You don't need any more IO so you can easily keep drive B: for data logging etc.

Personally I'd prefer to have the GPIB bridge on System I2C then it can be easily shared with other devices (such as RTC) or IO expansion. Saves on pins, so you might even have a COM port spare for a RS-232 printer or plotter.

Cue another design to look a lot like an HP85 on steroids to help Rob feel at home. :)
Built-in 7" or so flatscreen VGA monitor.
Built in keyboard.
Built in GPIB bridge.
SDcard slot on the front where the tape drive should be.
Large case full of empty space.  :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9115
Posted: 02:36pm 01 Feb 2024
Copy link to clipboard 
Print this post


UPDATE
Please see a WORKING test/example program on my current development build.
Note how an individual interrupt can be allocated to each of the channels on a USB hub when a gamepad of any sort is plugged in.
Following my earlier post and Tom's response, this is how I would intend that the gamepad interface works. Of course, the gamepad can also be polled if required using the DEVICE(GAMEPAD function as in the interrupt.
The interrogation of buttons and analogue values are exactly the same as for a Wii Classic and the same as the CMM2.
As per the picture this program was running with both a functional keyboard and mouse also connected.
Currently left to do is the code to format PS4 data as per the other controllers and providing a MMBasic interface to the mouse.

Const ps4=128
Const ps3=129
Const snes=130
For i=1 To 4
 If MM.Info(usb i)=ps3 Then
   PS3channel=i
   Print "PS3 controller found on channel ",PS3channel
EndIf
 If MM.Info(usb i)=130 Then
   SNESchannel=i
   Print "SNES controler found on channel ",SNESchannel
 EndIf
Next

If PS3channel Then Device gamepad interrupt enable PS3channel,ps3int
If SNESchannel Then Device gamepad interrupt enable SNESchannel,genericint
Pause 1000
Do
Loop

Sub ps3int
  Print "PS3 interrupt: ";
  myint ps3channel
End Sub

Sub genericint
 Print "Generic interrupt: ";
 myint SNESchannel
End Sub

Sub myint(USBchan)
Print DEVICE(gamepad USBchan, lx);
Print DEVICE(gamepad USBchan, ly);
Print DEVICE(gamepad USBchan, rx);
Print DEVICE(gamepad USBchan, ry);
Print DEVICE(gamepad USBchan, l);
Print DEVICE(gamepad USBchan, r)
Static integer l%=0
m%=1
a%=DEVICE(gamepad USBchan, b)
t%=l% Xor a%
If t% And m% Then
  If a% And m% Then : Print "R_ON":Else : Print "R_OFF":EndIf
EndIf
Inc m%,m%
If t% And m% Then
  If a% And m% Then : Print "Start_ON":Else : Print "Start_OFF":EndIf
EndIf
Inc m%,m%
If t% And m% Then
  If a% And m% Then : Print "Home_ON":Else : Print "Home_OFF":EndIf
EndIf
Inc m%,m%
If t% And m% Then
  If a% And m% Then : Print "Select_ON":Else : Print "Select_OFF":EndIf
EndIf
Inc m%,m%
If t% And m% Then
  If a% And m% Then : Print "L_ON":Else : Print "L_OFF":EndIf
EndIf
Inc m%,m%
If t% And m% Then
  If a% And m% Then : Print "DOWN_ON":Else : Print "DOWN_OFF":EndIf
EndIf
Inc m%,m%
If t% And m% Then
  If a% And m% Then : Print "RIGHT_ON":Else : Print "RIGHT_OFF":EndIf
EndIf
Inc m%,m%
If t% And m% Then
  If a% And m% Then : Print "UP_ON":Else : Print "UP_OFF":EndIf
EndIf
Inc m%,m%
If t% And m% Then
  If a% And m% Then : Print "LEFT_ON":Else : Print "LEFT_OFF":EndIf
EndIf
Inc m%,m%
If t% And m% Then
  If a% And m% Then : Print "ZR_ON":Else : Print "ZR_OFF":EndIf
EndIf
Inc m%,m%
If t% And m% Then
  If a% And m% Then : Print "X_ON":Else : Print "X_OFF":EndIf
EndIf
Inc m%,m%
If t% And m% Then
  If a% And m% Then : Print "A_ON":Else : Print "A_OFF":EndIf
EndIf
Inc m%,m%
If t% And m% Then
  If a% And m% Then : Print "Y_ON":Else : Print "Y_OFF":EndIf
EndIf
Inc m%,m%
If t% And m% Then
  If a% And m% Then : Print "B_ON":Else : Print "B_OFF":EndIf
EndIf
Inc m%,m%
If t% And m% Then
  If a% And m% Then : Print "ZL_ON":Else : Print "ZL_OFF":EndIf
EndIf
l%=a%
End Sub





Edited 2024-02-02 00:38 by matherp
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4039
Posted: 02:46pm 01 Feb 2024
Copy link to clipboard 
Print this post

Hi Peter,

Three questions:

- Can I have multiple controllers of the same type (on different channels) ?
- Presumably I would need a different interrupt SUB for each because the interrupt SUBs don't otherwise know what channel they were called for ?
- Will DEVICE(GAMEPAD <channel>, ...) return a special value if not a GAMEPAD or an ERROR ?

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9115
Posted: 03:40pm 01 Feb 2024
Copy link to clipboard 
Print this post

  Quote  - Can I have multiple controllers of the same type (on different channels) ?
- Presumably I would need a different interrupt SUB for each because the interrupt SUBs don't otherwise know what channel they were called for ?
- Will DEVICE(GAMEPAD <channel>, ...) return a special value if not a GAMEPAD or an ERROR ?


Yes
Yes
0=not in use, 1=keyboard, 2=mouse, 128=ps4, 129=ps3, 130=SNES/Generic
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4039
Posted: 04:04pm 01 Feb 2024
Copy link to clipboard 
Print this post

  matherp said  
  Quote  - Will DEVICE(GAMEPAD <channel>, ...) return a special value if not a GAMEPAD or an ERROR ?


0=not in use, 1=keyboard, 2=mouse, 128=ps4, 129=ps3, 130=SNES/Generic


That can't be right can it ? Those values would conflict with the standard "Wii Classic" style return data from DEVICE().

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9115
Posted: 04:15pm 01 Feb 2024
Copy link to clipboard 
Print this post

DEVICE(GAMEPAD <channel>, ...)
not
Will DEVICE(GAMEPAD <channel>, ...)
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4039
Posted: 04:22pm 01 Feb 2024
Copy link to clipboard 
Print this post

  matherp said  DEVICE(GAMEPAD <channel>, ...)
not
Will DEVICE(GAMEPAD <channel>, ...)


Huh ?

Will as in "Will you ...?", "Will it ?"

I'll be more specific.

What will:

DEVICE(GAMEPAD 1, b)


return if USB channel 1 doesn't have a "gamepad" attached to it ?

Best wishes,

Tom
Edited 2024-02-02 02:23 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9115
Posted: 04:39pm 01 Feb 2024
Copy link to clipboard 
Print this post

Sorry I answered the wrong question

mm.info(usb n) returns 0=not in use, 1=keyboard, 2=mouse, 128=ps4, 129=ps3, 130=SNES/Generic

device(gamepad b, anything) returns zero if not connected
 
     Page 6 of 13    
Print this page
© JAQ Software 2024