Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:25 27 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 : PICO PETSCII

     Page 36 of 38    
Author Message
IanRogers

Senior Member

Joined: 09/12/2022
Location: United Kingdom
Posts: 151
Posted: 09:27am 30 Nov 2023
Copy link to clipboard 
Print this post

Yeah Sorry  I have just seen it.

I was playing the Dos version... It's like mission impossible but 3D

Cheers
I'd give my left arm to be ambidextrous
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4042
Posted: 11:59pm 30 Nov 2023
Copy link to clipboard 
Print this post

Posting here so as not to tramp over the beta thread:

pet25e-thwill.zip

1. Now loads resources relative to MM.INFO$(PATH) where available, otherwise loads them relative to CWD$. This should make it launchable from the Game*Mite File Browser.

2. Significantly rewrote the controller/keyboard code. It's more verbose now but I believe clearer and more extendable. This isn't necessarily my "last word" on controller support, but all I could manage tonight.

I have not tested this as much as I would have liked, and the NES controller support is completely untested.

It may be a bug that I've introduced ... or it may not, but when using the Game*Mite I find it difficult/impossible to get out of the map mode and there is some screen "corruption" when it attempts, i.e. half or sometimes all the play area goes black.

Best wishes,

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

Joined: 05/03/2018
Location: Netherlands
Posts: 4243
Posted: 06:21am 01 Dec 2023
Copy link to clipboard 
Print this post

Hi Tom,

I Will take a look, but have a Little patiënce . This weekend is Dutch Sinterklaas, and we have visitors all weekend. My grandchildren.

Maybe Martin has an earlier opportunity.

Volhout
Edited 2023-12-01 16:23 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 06:41am 01 Dec 2023
Copy link to clipboard 
Print this post

Tom
first impression on Pico Mite VGA

> load "pet25e-thwill.bas
> RUN

[291] read_input$ = Call(read_ctrl$)
Error : Unknown user function


ok, read listing an uncommented the NES Controller  
but should also run without

> RUN
[291] Load image path$("images/introscreen.bmp"),0,10
Error : Could not find the path
>
> ? path$("images/introscreen.bmp")
NONE/images/introscreen.bmp
> files
B:/petrobot25d
  <DIR>  data
  <DIR>  images
  <DIR>  lib
  <DIR>  music
09:18 30-11-2023      63069  pet25d.bas
23:50 30-11-2023      64852  pet25e-thwill.bas
19:41 30-11-2023      63533  pet25e.bas
4 directories, 3 files


removed the Path$ when loading ...

[291] Pulse a_latch, pulse_len!
Error : Pin 0/NULL is not an output

so sadly something doesn't work right now on a non "Game*Mite" Pico
I will do more tests
Edited 2023-12-01 17:13 by Martin H.
'no comment
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4042
Posted: 07:46am 01 Dec 2023
Copy link to clipboard 
Print this post

This is why I didn't post it to the beta thread . Don't fuss yourself Martin I'll wire up my PicoGAME VGA so I can test it myself.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 07:49am 01 Dec 2023
Copy link to clipboard 
Print this post

  thwill said  This is why I didn't post it to the beta thread . Don't fuss yourself Martin I'll wire up my PicoGAME VGA so I can test it myself.

Best wishes,

Tom


Thank you Tom, My hair is gray enough as it is.
It would be nice if you could program the controls, because that's where you have the most experience from all of us.
Edited 2023-12-01 17:52 by Martin H.
'no comment
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4042
Posted: 02:55pm 02 Dec 2023
Copy link to clipboard 
Print this post

OK, let's try that again:

   pet25e-thwill-2.zip

I've taken more liberties:

- The scrolling header now starts with the identified platform, one of:
  - Generic PicoMite
  - Generic PicoMiteVGA
  - Game*Mite
  - PicoGAME VGA

- The platform is determined by looking for a setting for the "device" property in a file called "A:/.spconfig" or "A:/.config". If this isn't present then it is determined using MM.DEVICE$.

  e.g.

    device = "Game*Mite"

  or

    device = "PicoGAME VGA"

- If "Game*Mite" is configured then will use the Game*Mite controls. If "PicoGAME VGA" is configured then (by default) will use NES gamepad connected to port A.

- On the PicoGAME VGA you can for "kicks and giggles" use an Atari joystick connected to port A (in combination with the keyboard), configure as follows:

    device = "PicoGAME VGA"
    default-controller = "atari-a"


Two more comments:

1. I find the controls for the NES/Game*Mite to be sub-optimal (I frequently end up doing the wrong thing when using the button combinations), I'll have a play and post an alternative tomorrow.

2. I think there is an occasional glitch/flicker with the PicoMiteVGA suggesting that it is not correctly synchronized with the scan line.

@Volhout, @Martin H, please let me know if I am overstepping my welcome with these changes and I'll go and find something else to do.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 04:57pm 02 Dec 2023
Copy link to clipboard 
Print this post

Thank you Tom,
i wouldn't be able to test it before monday.
The button assignment on the NES controller is a compromise because it simply has too few buttons.
That's why the SNES controller is recommended for the other versions.
Didn't see a VGA Glitch ..
Edited 2023-12-03 04:01 by Martin H.
'no comment
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4243
Posted: 07:07pm 02 Dec 2023
Copy link to clipboard 
Print this post

Tom,

You know A:/ is erased as soon as you assign MODBUFF.
Did you configure mod buffer in Game*Mite ?

Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9122
Posted: 07:12pm 02 Dec 2023
Copy link to clipboard 
Print this post

Tom: any chance of you including the Wii classic in your config now it is supported?
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4042
Posted: 07:30pm 02 Dec 2023
Copy link to clipboard 
Print this post

  Martin H. said  The button assignment on the NES controller is a compromise because it simply has too few buttons.


I know, you've told me 3 times . It doesn't mean we can't do better, watch this space ... tomorrow.

  Martin H. said  Didn't see a VGA Glitch ..


It's possible it's my hardware, but I think not. Possibly I will investigate.

  Volhout said  You know A:/ is erased as soon as you assign MODBUFF.
Did you configure mod buffer in Game*Mite ?


Yup, the instructions for the Game*Mite have always included OPTION MODBUFF ENABLE. Even though I'm now using the standard firmware the next Game*Mite software release will include a .uf2 including this configuration and an appropriate A:/.spconfig file.

  matherp said  Tom: any chance of you including the Wii classic in your config now it is supported?


That is the plan Peter, i have the controller (for my CMM2) but I don't have any of those little 3 finger break-out boards and I can only find them from China, and it doesn't look easily hackable. I plan to order some with an AliExpress order in the New Year.

Best wishes,

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

Joined: 11/12/2012
Location: United Kingdom
Posts: 9122
Posted: 08:01pm 02 Dec 2023
Copy link to clipboard 
Print this post

  Quote   but I don't have any of those little 3 finger break-out boards and I can only find them from China, and it doesn't look easily hackable. I plan to order some with an AliExpress order in the New Year.


I cut up a spare CMM2 motherboard and soldered flying leads onto it. I can stick a couple in the post if you want
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 08:37pm 02 Dec 2023
Copy link to clipboard 
Print this post

What is the contact spacing?
If it is roughly 0.1" a scrap of strip-board may work. With just 3 strips it won't need to ne exact, as long as the strips don't bridge adjacent contacts.

Edit
Looking at Grogsters pics they seem to be exactly 0.1".
Edited 2023-12-03 06:52 by phil99
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6099
Posted: 09:10pm 02 Dec 2023
Copy link to clipboard 
Print this post

  phil99 said  What is the contact spacing?
If it is roughly 0.1" a scrap of strip-board may work. With just 3 strips it won't need to ne exact, as long as the strips don't bridge adjacent contacts.

Edit
Looking at Grogsters pics they seem to be exactly 0.1".


Double sided and I measure 1.9mm spacing on the gerbers.
You can buy wii extension leads which make a tidy way of getting a socket.

Jim
VK7JH
MMedit   MMBasic Help
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4042
Posted: 09:28pm 02 Dec 2023
Copy link to clipboard 
Print this post

  matherp said  I cut up a spare CMM2 motherboard and soldered flying leads onto it.


I thought of that, but ...

"A superlative suggestion, sir, with just two minor flaws. One: I don't have any CMM2 motherboards. And two: I don't have any CMM2 motherboards. Now I realise that, technically speaking, that's only one flaw; but I thought it was such a big one, it was worth mentioning twice."

  matherp said  I can stick a couple in the post if you want


If it's important enough for you to do that then I'll make it happen. I've emailed you my address.

Best wishes,

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

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4042
Posted: 12:32pm 03 Dec 2023
Copy link to clipboard 
Print this post

Hi folks,

I have taken further liberties:

   pet25g-thwill-1.zip

- Rebased on @Volhout's pet25g release.

- Reconfigured Game*Mite / NES controls:

  - FIRE A           Acts as START on menu-screen
  - SELECT           Toggles between walk/search/move modes
  - START            Acts as START on menu-screen,
                     QUIT (if pressed twice) during game
  - UP
  - UP + FIRE A      Fire up
  - UP + FIRE B      Toggles weapons
  - DOWN
  - DOWN + FIRE A    Fire down
  - DOWN + FIRE B    Toggles items
  - LEFT
  - LEFT + FIRE A    Fire left
  - LEFT + FIRE B    Use item
  - RIGHT
  - RIGHT + FIRE A   Fire right
  - RIGHT + FIRE B   Map

  Because A & B on their own now do nothing during game-play this
  IMO makes it less likely to do the wrong thing accidentally.

- Suppressed auto-repeat of user input EXCEPT for movement.
  e.g. to fire multiple times to the right now you would hold down A
       and explicitly press RIGHT multiple-times, not hold RIGHT down.

- Improved UI feedback on map:
  - Beeps when map button is activated.
  - Writes current map mode to message area.
  - Tried to reduce graphical glitch when entering map, there is
    still an issue where the player sprite is briefly shown over
    the map, perhaps someone more familiar with the graphics can fix.

- Titivated messages on intro screen.

- There are still issues with control responsiveness on intro screen,
  I may look at those at a later time.


Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4042
Posted: 03:35pm 03 Dec 2023
Copy link to clipboard 
Print this post

Hmm, I've been lounging in bed playing it and Game*Mite controls still need work. "Use item" needs to be more convenient as does accessing "Move". I will have to rummage further.

Best wishes,

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

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 05:27pm 04 Dec 2023
Copy link to clipboard 
Print this post

Hi Harm & Martin,
I now have a working Wii Classic, for my own purposes I have mapped it up to the controls in Petscii as follows, this is purely a initial stab for my own testing.
 ' Controller driver for Wii Classic gamepad.
Function ctrl_wiiclassic$(init%)
 If Not init% Then
   Local bits%, i%, s$
   bits%=DEVICE(wii b)
   If bits% Then
     Select Case bits%
       Case &h0080 : s$ = "fire-up"       ' cursor up
       Case &h0020 : s$ = "fire-down"     ' cursor down
       Case &h0100 : s$ = "fire-left"     ' cursor left
       Case &h0040 : s$ = "fire-right"    ' cursor right
       Case &h0010 : s$ = "toggle-weapon" ' sholder button L
       Case &h0001 : s$ = "toggle-item"   ' sholder button R
       Case &h0800 : s$ = "move"          ' button a
       Case &h2000 : s$ = "search"        ' button b
       Case &h0004 : s$ = "map"           ' button home
       Case &h0008 : s$ = "escape"        ' Select
       Case &h0002 : s$ = "use-item"      ' Start
     End Select
   Else
     wiiry%=DEVICE(wii RY)
     If wiiry%>205 Then
       s$ = "up"            ' Right Joy up
     ElseIf wiiry%<50 Then
       s$ = "down"          ' Right Joy down
     EndIf
     wiirx%=DEVICE(wii RX)
     If wiirx%<50 Then
       s$ = "left"          ' Right Joy left
     ElseIf wiirx%>205 Then
       s$ = "right"         ' Right Joy right
     EndIf
   EndIf

   ctrl_wiiclassic$ = s$
   Exit Function
 Else
   DEVICE wii open
 EndIf
End Function

Regards, Kevin.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9122
Posted: 05:56pm 04 Dec 2023
Copy link to clipboard 
Print this post

The Wii Classic supports multiple buttons at the same time. Your code will not return anything in this case. I assume the receiving code is happy with a response all the time a button is pressed rather than just on initial press?
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4042
Posted: 06:04pm 04 Dec 2023
Copy link to clipboard 
Print this post

  matherp said  The Wii Classic supports multiple buttons at the same time. Your code will not return anything in this case.


That seemed appropriate for the other controllers.

  matherp said  I assume the receiving code is happy with a response all the time a button is pressed rather than just on initial press?


In my latest version:

Function read_input$()
 Static last$
 read_input$ = read_inkey$()
 If Len(read_input$) Then Exit Function
 read_input$ = Call(CTRL_DRIVER$)

 ' Suppress auto-repeat except for movement.
 If last$ = read_input$ Then
   If Not InStr("up,down,left,right", last$) Then
     read_input$ = ""
     Exit Function
   EndIf
 Else
   last$ = read_input$
 EndIf
End Function


Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
     Page 36 of 38    
Print this page
© JAQ Software 2024