Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 23:06 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 29 of 38    
Author Message
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1114
Posted: 04:45pm 15 Nov 2023
Copy link to clipboard 
Print this post

  Mixtel90 said  

Bit    SNES        NES

1 .     B          A
2 .     Y          B
3 .     Select     Select
4 .     Start      Start
5 .     Up         Up
6 .     Down       Down
7 .     Left       Left
8 .     Right      Right
9 .     A
10.     X
11.     L
12.     R


I think. :)

Thanks   , i come back to this when i got a Snes Controller to implement.
But in your experience, do I still have to shift through all 16 bits? I think they reset after the next Latch impulse?
The good thing is, that the directions and Start use the same bit, so the Menu works with both, so the user is able to navigate to the "Controlls" and select the right controller
Edited 2023-11-16 02:55 by Martin H.
'no comment
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1114
Posted: 05:12pm 15 Nov 2023
Copy link to clipboard 
Print this post

  matherp said  
  Quote  Tested the pet24eMod on the Game*Mite
The image when scrolling is, from my point of view, completely sufficient.


Please could you try with the firmware just posted above - thanks

tested ..
In the previous versions pre 24eMod
sometimes the bottom Tile row(s) was displayed a little delayed.

This is no longer visible. In my opinion, this was no longer visible with the last firmware and Kevin's changes in the *.MOD version.
So I cant say if the last Firmware Update made a difference.
'no comment
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 05:52pm 15 Nov 2023
Copy link to clipboard 
Print this post

Hi Martin & Peter,
Sorry, can't look at it now, I'll have a look tomorrow, it's supposed to be raining all day. :-(
Regards Kevin.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9126
Posted: 06:33pm 15 Nov 2023
Copy link to clipboard 
Print this post

The changes in the latest version RC19 are:
1: the merge routines wait for frame blanking by reading the scanline (ILI9341, ST7789_320, and ILI9488)
2: The SPI rate has been significantly increased (nearly double)
3. FRAMEBUFFER WAIT now works for ILI9341, ST7789_320, and ILI9488 but probably not needed given 1
This version now up on Geoff's site on usual address

Other:

I've got a Wii classic wired to a GameMite and will post  I/F code sometime over the next week or so (traveling for the next three)



Edited 2023-11-16 04:38 by matherp
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6798
Posted: 07:51pm 15 Nov 2023
Copy link to clipboard 
Print this post

I like the idea of having the WII controllers on the PicoMite (or any I2C controllers for that matter). I just don't like using the PCB as a connector. Looks like I could get sockets from AE though.

I had reasonable success in using a RP2040-Zero as a I2C slave controller for both analogue and digital inputs. I never got round to testing it on a decent length of wire though.
Mick

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

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 09:49am 16 Nov 2023
Copy link to clipboard 
Print this post

Hi Harm,
To answer your question, why does moving your world generation code to after your player/robot generation code. My theory!
When you redraw the world, lots of stuff is potentially changing, so plenty of scope for your eyes to catch any inconsistencies. When you redraw the player layer, most of it is transparent, the player doesn't actually move, is always on the same square, the only other movement is the occasional robot, gun shots, etc, all very small and very easy to miss any inconsistency, most of which may occur in the transparent tiles anyway.
So by doing the player plotting first, the chances of you seeing any problems because the LCD is still in the process of updating in the background, are almost nill, by the time the player/robots have been updated, the LCD screen will have easily finish refreshing, so now the world is regenerated and the new frame is then ready for the next background LCD refresh to start, etc....
So the problem is being masked, or something! ;-)
Now to test your latest and Peters new update.
Regards, Kevin.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4246
Posted: 10:57am 16 Nov 2023
Copy link to clipboard 
Print this post

Hi Kevin,

Thank you for your explanation. I was afraid this would be your reasoning, and hence my worries. Let me explain.

In the game loop there are functions and subs that work on background data, and subs that actually write to the screen. Sometimes the name of the subs can be confusing (due to my personal development in writing games, I sometimes changed the content (and thus function) of a sub. And it not always exactly does what it's name says (i.e. writeplayer does not actually write to ecreen anymore).

In the game main loop, all screen (either VGA or LCD) activity (block screen write routines) takes place here:



writeworld_n: copies section of the world map to N layer in the view window.
writesprites: clears L layer and redraws all sprites.

subs like "ani-tiles" and "writeplayer" prepare data for the actual screen writing routines, but do not actually write.

The only exemption to the above is the data that is written in the game border on layer N. The weapon/item/key/player face/comments are directly written to N, only when changed. And the loop time indicator in the top right, is written each loop.

Now about your change.

Since you have not changed the order in which writeworld and writesprites work, you have not fixed what you intended to fix.
But you did change the timing relation in the loop between the block screen write routines, and the "incidental" screen write routines that show weapon/item/player_face/comment strings and loop time.

Regards,

Volhout

P.S. I was able to lower the loop time by 10ms by re-organizing the "scan_units" SUB.
Hooray... now we can add the missing things.
Edited 2023-11-16 21:49 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 12:52pm 16 Nov 2023
Copy link to clipboard 
Print this post

Hi Harm,
Ok I can see what you mean, in that case, I know what is happening, the LCD background update is started, at the end of the main loop, so by moving the writeworld_n and ani_tiles to after all the player and robot logic, it is allowing enough time for the LCD copy to finish in the background, before the next writeworld_n and ani_tiles are called, which in theory is even better, as long as no other problems.

Anyway, whatever the reason, I can't now see any problems with the LCD display. Before the code was moved, if the player ran along the side of, or towards or away from water, for example, you could see, the water offset, tear or only partially drawn, briefly, which to me didn't really matter, now, assuming you can't see any problems with the moved code we may as well leave it, because it seems to fix any screen tearing. :-)

I have tested Peters latest B19, with built in Framebuffer Wait, with both the original, pet24e, which is still tearing, I tried using both the full Framebuffer merge, and also Blit merge, there may be a slight improvement, it's difficult to judge, with the revised pet24emod, I can't detect any screen problems.

Regards, Kevin.

PS 10mS is very impressive, I thought it would turn out to be much more tricky to save that much. :-)
Edited 2023-11-16 23:05 by Bleep
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4246
Posted: 01:14pm 16 Nov 2023
Copy link to clipboard 
Print this post

Kevin,

Thanks for the update.

For now I will leave framebuffer merge in. Later we can decide what it is.
This evening I will continue with gameplay. I already started with difficulty implementation. For now:

- easy: 3 maps= player/bots/hidden items

- normal: 2 maps= player/bots

- hard: 1 map= player
       all hoverbots are agressive (according user manual from David Murray).

I may add regular life gain in easy mode, or evilbot less agressive in easy mode.

Thanks for your support.

Volhout
Edited 2023-11-16 23:17 by Volhout
PicomiteVGA PETSCII ROBOTS
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4043
Posted: 01:19pm 16 Nov 2023
Copy link to clipboard 
Print this post

  Bleep said  I have tested Peter's latest RC19, with built in Framebuffer Wait, with both the original, pet24e, which is still tearing, I tried using both the full Framebuffer merge, and also Blit merge, there may be a slight improvement, it's difficult to judge, with the revised pet24emod, I can't detect any screen problems.


Hmm, unless I have mistaken what Peter was describing (or am being more than usually dozy) his latest changes should have just eliminated tearing provided ALL screen updates are occurring via a background merge.

Best wishes,

Tom
Edited 2023-11-16 23:20 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 01:26pm 16 Nov 2023
Copy link to clipboard 
Print this post

Probably :-)
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4246
Posted: 01:38pm 16 Nov 2023
Copy link to clipboard 
Print this post

Watch out: framebuffer wait is currently bypassed when Game_Mite=1

Volhout
PicomiteVGA PETSCII ROBOTS
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 02:18pm 16 Nov 2023
Copy link to clipboard 
Print this post

Hi Harm,
Peter has built it into the Framebuffer merge and Blit merge commands, for the LCD.

  Quote  FRAMEBUFFER WAIT now implemented for ILI9341, ST7789_320 and ILI9488 displays
note however that the
BLIT MERGE and FRAMEBUFFER MERGE commands both now incorporate this functionality automatically. Assuming these are run on the second processor then tearing effects should be reduced or eliminated


I have also noticed a difference between pet24e and Pet24emod, it seems to me, that with Pet24e when you hold down the move buttons and then release, the player always moves on one more square, however on Pet24eMod as soon as you release the move buttons, the player stops. This would make sense as the order of calculation now is key input, game logic, draw world and layer, so a button change is always instant.

Regards, Kevin.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4246
Posted: 02:38pm 16 Nov 2023
Copy link to clipboard 
Print this post

  Bleep said  I have also noticed a difference between pet24e and Pet24emod, it seems to me, that with Pet24e when you hold down the move buttons and then release, the player always moves on one more square, however on Pet24eMod as soon as you release the move buttons, the player stops. This would make sense as the order of calculation now is key input, game logic, draw world and layer, so a button change is always instant.


Another reason to adopt your modification Kevin...

Volhout
PicomiteVGA PETSCII ROBOTS
 
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 218
Posted: 06:09pm 16 Nov 2023
Copy link to clipboard 
Print this post

Hello dear Volhout! 73!
Sorry for writing here.
I am interested in your SSTV program, but it does not run on the new version of PicoMiteVGA 05.07.08RС14 due to outdated PIO functions. Is there an updated version of this code and where, if possible, can I get it?
Yes, and I would like to change the program input port from GP01 to GP22, how can I do this?
Edited 2023-11-17 04:24 by javavi
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4246
Posted: 08:51pm 16 Nov 2023
Copy link to clipboard 
Print this post

Hi Javavi,

You could search on the forum, and reply in the SSTV decoder thread.
I noticed you have send me a mail, I will look at into it tomorrow. I am currently not in my shed, where I keep the hardware interface for SSTV.

Volhout
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4246
Posted: 09:00pm 16 Nov 2023
Copy link to clipboard 
Print this post

Martin, others,

This is the harvest for today. Additions

- play time in end screen
- EMP works (freezes all bots for 3 seconds).
- difficulty level
 o easy:   3 maps= player/bots/hidden items
 o normal: 2 maps= player/bots
 o hard:   1 map= player
           all hoverbots are agressive (in line with original).

pet24f.zip


On my todo-list remain
- plasma fire hits multiple targets
- magnet impacting robots
- drown hoverbot over water when EMP hits...

For Martin/Tom/Kevin:
- section "controls"...?? Or remove the entry ?
- further adaptations for Game_Mite implementation ?

And then
- remove cheat keys
- check for completeness (sounds correct/information texts)
- issue a release candidate
- hours and hours of test play
- final release
- write documentation, so others can understand and modify the code

Volhout
Edited 2023-11-17 07:10 by Volhout
PicomiteVGA PETSCII ROBOTS
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4043
Posted: 09:10pm 16 Nov 2023
Copy link to clipboard 
Print this post

TODO:

Speak with The 8-Bit Guy - I still have misgivings regarding what his feelings about this might be. You are taking his "thing" and running it in BASIC on $20 of microcontroller and some odds and ends, that is something he can't come anywhere near to doing in BASIC on $300+ of his "dream computer" (Commander x16). Hopefully he will be better at swallowing his pride than I am.

Best wishes,

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

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1114
Posted: 05:07am 17 Nov 2023
Copy link to clipboard 
Print this post

  thwill said  TODO:

Speak with The 8-Bit Guy - I still have misgivings regarding what his feelings about this might be. You are taking his "thing" and running it in BASIC on $20 of microcontroller and some odds and ends, that is something he can't come anywhere near to doing in BASIC on $300+ of his "dream computer" (Commander x16). Hopefully he will be better at swallowing his pride than I am.

Best wishes,

Tom

Good Morning Tom,

Yes, one has to get in contact with David (Native English speakers preferred),after it is growing to something presentable. So that he even notices that a new port of his program is being created.

The reasons he made the program open source (imho):
After all the porting for different systems, he simply lost his enthusiasm. But according to him, he supports anyone who wants to do a Port to other systems.(what we are doing here)

look at ~24:00

Cheers
Martin
Edited 2023-11-17 15:54 by Martin H.
'no comment
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1114
Posted: 08:09am 17 Nov 2023
Copy link to clipboard 
Print this post

  Volhout said  Martin, others,

This is the harvest for today. Additions

Volhout

First impression, Nes Controller no longer works in the new version ..
Also the changes, i made in start menu are gone.
I will look after it later
Edited 2023-11-17 18:17 by Martin H.
'no comment
 
     Page 29 of 38    
Print this page
© JAQ Software 2024