Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 22:37 29 Apr 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 : PicoMite/PicoMiteVGA V5.07.05 betas

     Page 10 of 11    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8584
Posted: 08:03pm 15 Aug 2022
Copy link to clipboard 
Print this post

  Quote  in the Editor F1 now saves and runs the current programme just like F2, it should't do that, right?


Not for me it doesn't
 
fred777
Regular Member

Joined: 01/07/2021
Location: United Kingdom
Posts: 57
Posted: 07:35am 16 Aug 2022
Copy link to clipboard 
Print this post

  matherp said  Not for me it doesn't


And.... after a rebooting the laptop that runs teraterm the F1 key now works fine...
I mean...what? I should have remebered to reboot before doing anything
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3534
Posted: 05:46pm 17 Aug 2022
Copy link to clipboard 
Print this post

@Peter,

Just a generic question. It is only recent that I received some NES controllers and use them to play games. Before that I always used the keyboard to play.
And (this may be alzheimer) I always used INKEY$ to control these games, where inkey$ gave the most recent key press as a return value (or none (empty string), when there was no recent keypress).

Now I find it hard to play games that use INKEY$ to detect key presses. And I have no idea why. Is there something changed in the way the INKEY$ returns values, or is it simply that my games are not handling the keyboard improper.

Is it possible that the INKEY$ now handles repeat keys when you press the keys for too long, and that that behavior has changes from before ? I have really no idea why it is more difficult to control a game with INKEY$ than I remember from other platforms or software versions.

Again, it may be just my perception, and korsakov has struck (1 beer too many).

Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8584
Posted: 06:01pm 17 Aug 2022
Copy link to clipboard 
Print this post

  Quote  Just a generic question.


Which version? What keyboard (PC or PS2)?
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3534
Posted: 08:24pm 17 Aug 2022
Copy link to clipboard 
Print this post

I am referring to the VGA picomite with PS2 keyboard.

EDIT: In Vegipetes game (the contest game) I found a remark about the keyboard not working well. So it could very well be I have just stumbled on some games that are less than optimal for keyboard play, and that play better using a gamepad.
The other where I had problems playing with keyboard was the PicoVaders from Martin Herhaus.

Again, it may just be the games that need some tuning...
Edited 2022-08-18 06:38 by Volhout
PicomiteVGA PETSCII ROBOTS
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1082
Posted: 09:00pm 17 Aug 2022
Copy link to clipboard 
Print this post

In the CMM2 version of the game in question, I used KEYDOWN() to report keys being pressed.

The MMB4W version worked the same, although (if memory serves) the SHIFT and CTRL keys seemed to clear the detection of other (arrow) keys being pressed.

In the PicoMiteVGA version, I had to use INKEY$ to report ascii characters received from the keyboard as KEYDOWN() isn't implemented.
Visit Vegipete's *Mite Library for cool programs.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8584
Posted: 08:05am 18 Aug 2022
Copy link to clipboard 
Print this post

PS2 keyboards generate the auto-repeat themselves. IFF your keyboard accepts the commands then you can tune the autorepeat rate using the OPTION KEYBOARD command - see manual
Edited 2022-08-18 18:06 by matherp
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3846
Posted: 09:03am 18 Aug 2022
Copy link to clipboard 
Print this post

I *suspect* that the behaviour of INKEY$ hasn't changed, it has always been sub-optimal for action games you just haven't noticed until you've had the alternative of a controller to compare it with.

1) Reading the pins connected to a controller gives you a snapshot of what the player is trying to do NOW.

2) Reading the keyboard with INKEY$ says nothing about NOW but gives you historical information about what sequence of keys the player has pressed since you last called INKEY$. It also can't detect simultaneous keypresses or determine whether the user is holding a key down, at least not until the auto-repeat kicks in.

Presumably KEYDOWN() on the CMM2 and MMB4W behaves more like (1).

What I did on my (still unreleased) PicoGAME lazer-cycles game is use ON KEY to consume keypresses immediately storing them in a bitmap for when I actually needed them. This mostly worked around the multiple key-presses issue but threw away ordering information and still can't detect a key being held down.

' Snippet of keyboard code from lazer-cycle.bas

Dim keys%(31)
...

On Key on_key()
...

Sub on_key()
 Local ch$ = Inkey$
 If ch$ <> "" Then Poke Var keys%(), Asc(UCase$(ch$)), 1
End Sub
...

Function ctrl_keys1%(idx%)
 ctrl_keys1% = cycle.dir%(idx%)

 If Peek(Var keys%(), 65) Then      ' A
   ctrl_keys1% = NORTH%
   Poke Var keys%(), 65, 0
 ElseIf Peek(Var keys%(), 90) Then  ' Z
   ctrl_keys1% = SOUTH%
   Poke Var keys%(), 90, 0
 ElseIf Peek(Var keys%(), 44) Then   ' comma
   ctrl_keys1% = WEST%
   Poke Var keys%(), 44, 0
 ElseIf Peek(Var keys%(), 46) Then   ' full-stop
   ctrl_keys1% = EAST%
   Poke Var keys%(), 46, 0
 EndIf
End Function

Edited 2022-08-18 19:23 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3534
Posted: 10:21am 18 Aug 2022
Copy link to clipboard 
Print this post

  matherp said  PS2 keyboards generate the auto-repeat themselves. IFF your keyboard accepts the commands then you can tune the autorepeat rate using the OPTION KEYBOARD command - see manual


Wauw.... I didn't know that. It is actually the case that I use a different PS2 keyboard lately. Since all my equipment was USB, I borrowed one from a friend in the CMM1 and early picomite development. Then I found one on a flea market, and use that since.
I always assumed a keyboard is like a hammer. You pick it up, and you hit a nail. A hammer is a hammer.
Maybe this particular keyboard has an annoying key repeat pre-defined -or- set up. I will definitely try to play with that.

Thanks !!!

Volhout

@Tom: thanks for the demo code. I will look at integrating that in my game code (I am finalizing my Circle game, but it is NES controller only since essentially I wrote the game to prove the PIONES controller code).
Edited 2022-08-18 20:23 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 903
Posted: 12:35pm 19 Aug 2022
Copy link to clipboard 
Print this post

@Volhout
in vegipetes PICO Version of "Stellar Battle in the Seven Green Hills Zone" I added one Line to get Keypress much more responsive.
Do While Inkey$<>"": Loop
You might think, that ,as long as the Key is still pressed, the program will stuck in an  infinit loop but it doesn't.
The loop runs much faster than the Keyboard is able to send new data, it just empties the Keyboardbuffer. which costs ~no time

Tested with Terminal but i think there is no difference with a plugged in PS2 Keyboard




....
MakeObstacles

SetTick 25,MM,1   ' start timer interrupt for sound and shield repair

Do
 ' test for key presses

 k = Asc(Inkey$)
 Do While Inkey$<>"": Loop   'clear the rest of the buffer
 If k Then ServiceKey k    ' found a key in the console buffer?

...

Edited 2022-08-19 22:52 by Martin H.
'no comment
 
KenH
Newbie

Joined: 06/02/2022
Location: United Kingdom
Posts: 13
Posted: 03:07pm 23 Aug 2022
Copy link to clipboard 
Print this post

Hello Peter

I am wondering whether you may have missed my previous post.

I have discovered a few more minor bugs whilst working with advanced GUI controls:

When you change pages the 'UP' icon of a spinbox is not erased.
The rest of the spinbox is erased as expected. The program below demonstrates.
Tested with both ILI9488 and ILI9341.

If you touch a radio button very briefly (say with a stylus) the radio button changes, but a GUI Interrupt is not triggered.

Similarly, pressing an ordinary button very briefly makes it stay in the 'pressed' position with no interrupt.

Sometimes the 'UP' or 'DOWN' icons on a spinbox stay illuminated and the control freezes. This may well be the same issue as with buttons above.

Subjectively, all of the above seem more frequent if "Beep" is enabled.

MM.INFO$(RESET) appears to throw an error:

> print MM.INFO$(RESET)
Error : Syntax
>

Best wishes

Ken

cls
GUI setup 1
Font #3,1: GUI spinbox #1,50,50,150,35,RGB(cyan),RGB(32,32,32),1,0,10
Font #3,1: GUI spinbox #2,100,150,200,50,RGB(cyan),RGB(32,32,32),1,0,10

Page 1
pause 5000
GUI setup 2
Page 2
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8584
Posted: 03:59pm 23 Aug 2022
Copy link to clipboard 
Print this post

GUI functionality is supported by Geoff who I think is on holiday as am  I
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3534
Posted: 08:54am 24 Aug 2022
Copy link to clipboard 
Print this post

Hi Peter,

I hope you enjoy your holidays (as much or more tan I have mine).

When you return, could you check if there is a mismatch between the OPTION SYSTEM I2C bus speed and the promoted RTC clock chips.
See this post:

SYSTEM I2C speed 400kHz mismatch
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8584
Posted: 03:48pm 30 Aug 2022
Copy link to clipboard 
Print this post

PicoMite V5.07.05b18

https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip

Change to better support modules with >2Mb Flash chips
SPI for touch reduced in speed to 1MHz
GUI TEXTBOX ACTIVATE removed
Bug fix to GUI spinbox to erase triangle bounding line properly
Fix to BITBANG WS2812 timings
 
pwillard
Senior Member

Joined: 07/06/2022
Location: United States
Posts: 274
Posted: 06:10pm 30 Aug 2022
Copy link to clipboard 
Print this post

Peter,

FYI: Prior to this version, when I would press F1, it would SAVE and RUN but now it works normally.

Also, the PICO LIPO with 16MB seems to be working great now.

Thank you so much for your support.

Pete
Edited 2022-08-31 04:13 by pwillard
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1094
Posted: 05:15am 31 Aug 2022
Copy link to clipboard 
Print this post

Peter,

Thanks for the touch fix - all works as expected now.

Doug.
... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
billh
Newbie

Joined: 02/09/2022
Location: Australia
Posts: 1
Posted: 05:41am 02 Sep 2022
Copy link to clipboard 
Print this post

I've encountered an issue with the SDCARD in the VGA Design#1. The FILES command will only work after first using the LOAD command. FILES will then work correctly for the rest of the session.

Note that this issue occurs only on some SD Cards. I noticed this on a Transcend 4GB card.
Edited 2022-09-02 16:02 by billh
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3534
Posted: 01:15pm 03 Sep 2022
Copy link to clipboard 
Print this post

Hi Peter,

I would like to report a feature (a.k.a. bug) in the picomite 5.07.05b17 software (this is not the VGA version, but I expect it to be the same in the VGA version).

The default setup for extended function inputs (count/frequency/period) is GP6,7,8,9
The default (layout dependent) audio outputs are GP6,GP7.

I guess this intro is enough for Peter, but let me explain for the ones that don't get it yet.

If you assign the GP6 and GP7 pins to audio, the frequency measurement on GP8 and 9 is incorrect (i.e. 83 Hz versus 50Hz).
Most likely the timer clock divider is adapted to generate 44kHz audio, and this changes time/frequency measurement on all 4 pins in the group GP6,7,8,9.

the software warns the user not to use pin 6 and 7 (assigned to audio) but does not hint that GP8 and GP9 cannot be used anymore when

Setpin gp8,FIN
? pin(gp8)


Maybe a simple numerical correction of the output value of GP8 and GP9 is possible. Maybe a warning not to use GP8 and GP9.

Volhout

As a real hardware guy I expect my zero crossing circuit to fail, and spend some time measuring it before I started looking at the software....
Edited 2022-09-03 23:19 by Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8584
Posted: 01:27pm 03 Sep 2022
Copy link to clipboard 
Print this post

Can't replicate

 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5730
Posted: 01:46pm 03 Sep 2022
Copy link to clipboard 
Print this post

PS/2 keyboard isn't on, is it?
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
     Page 10 of 11    
Print this page
© JAQ Software 2024