Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 12:43 28 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 23 of 38    
Author Message
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3150
Posted: 01:23pm 04 Nov 2023
Copy link to clipboard 
Print this post

  Martin H. said  the Pause 100 has done the Job  


That fixed the SD problem for me. I also had to add "IF NOT Game_Mite then " before MODE 1 at line 240 to avoid an error.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4247
Posted: 01:28pm 04 Nov 2023
Copy link to clipboard 
Print this post

When ypu use the MERGE function, the second ARM processor is in charge of updating the LCD. On the same spi pins where the main ARM processor tries accessing the SD card. That is why Peter suggests to connect the SD card to different pins. Unfortunately the Game*Mite needs surgery to fix that. But the possibility exists.

1/ there are 4 free pins on the expansion header.
2/ the LCD based SD card has its own connector.

It is up to someone to prototype this an others to copy it. 4 wires is all that is needed. If we all implement it the same way, it is easy for Tom to adapt the platform and code (revision 2.0)

Volhout
Edited 2023-11-04 23:37 by Volhout
PicomiteVGA PETSCII ROBOTS
 
thwill

Guru

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

Hey folks,

  Volhout said  .. It is up to someone to prototype this an others to copy it. 4 wires is all that is needed. If we all implement it the same way, it is easy for Tom to adapt the platform and code (revision 2.0)


Everyone can hack their Game*Mite however they like, after-all one of the design goals was hackability, and that is exactly the reason why I won't (at least for the moment) be asking Mick to update the board to use up an additional 3-4 pins for the SD card; though if we do need to fab more boards we might look at what modifications can be made to make implementing this hack simpler.

Providing that you aren't using WAV or FLAC tracks (which I believe are read from the SD card as they play) and are not doing daft things like reading the SD card from an interrupt, then this conflict is easy enough to workaround: halt the background update, PAUSE 100, read the SD card and restart the background update.

In the longer term it may be possible to update the firmware to handle this conflict; I don't believe Peter said that was impossible, just that it was more work than he was inclined to engage in - fair enough as far as I'm concerned.

Note that any Game-ish-Mite based on the Parallel display such as my proposed Game2Mite or Peter's one with the Mickey Mouse ears (yep, still rankles, perhaps I'll grow up before I die ) will not exhibit this issue because the display is not SPI.

Keep up the good work,

Tom
Edited 2023-11-05 04:42 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Martin H.

Guru

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

  thwill said  In the longer term it may be possible to update the firmware to handle this conflict,
Keep up the good work,

Tom

Now that we know that this is caused by an access conflict between CPU2 (background process)LCD, CPU1 SD Cart.
We can avoid this by taking appropriate care.
I'm still happy with my Game Mite. At the beginning of this project there were enough doubts that this was even possible on the PicoMite SPI-LCD. Thanks to Kevin, Lance and Peter, we have come a long way.
cheers
Martin
'no comment
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6798
Posted: 03:47pm 04 Nov 2023
Copy link to clipboard 
Print this post

I'll have a look at the mod. It might be easier to move the SDcard SPI rather than the display. It doesn't have to have hardware SPI pins.
Mick

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

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

I wonder if there is a way of forcing an abort of the background operation, by maybe closing the buffer, or something similar, otherwise simply inserting a 100mS pause before and SD load or save does allows the background task to complete and so seems to do the job and it is only 1/10Sec compared to the actual load or save, which might be several 1/10 of a second.
Regards, Kevin.
Edited 2023-11-05 02:31 by Bleep
 
Mixtel90

Guru

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

It's *a lot* easier to move the SD card than the display. :)

The soldering iron comes out shortly.
Mick

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

Guru

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

  Mixtel90 said  It's *a lot* easier to move the SD card than the display. :)


That's what it looks like at the moment, but we have to tell anyone who wants to load the program later that if you have this or that configuration, then it won't work.
One don't solve a problem by changing the conditions. This would be at most a workaround. If we rely on it, we lose a lot of universality and compatibility.
What can't be the goal. With the one SD line we have an unfavorable solution, but if we can run it there too, all the better.
just my humble opinion
Edited 2023-11-05 05:26 by Martin H.
'no comment
 
Mixtel90

Guru

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

Mod done, working and documented.

Once the hardware is changed it's a case of
OPTION SDCARD DISABLE
OPTION SDCARD GP22, GP18, GP16, GP17

See the original Game*Mite thread. :)
Mick

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

Joined: 17/05/2016
Location: United States
Posts: 3150
Posted: 02:47am 05 Nov 2023
Copy link to clipboard 
Print this post

Martin--since you've had both the LCD and the VGA versions running (if I understand correctly), is there any noticeable difference to you in the smoothness of play?

I understand that in theory, the VGA version could be faster, but if movement is based on timer counts rather than when the code to make the move has completed, perhaps they are the same.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Martin H.

Guru

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

  lizby said  Martin--since you've had both the LCD and the VGA versions running (if I understand correctly), is there any noticeable difference to you in the smoothness of play?

I understand that in theory, the VGA version could be faster, but if movement is based on timer counts rather than when the code to make the move has completed, perhaps they are the same.

Ther is a "h_beat" Variable this determines how many milliseconds elapse between frame composition, so the frame rate is 1000/h_beat.
in the upper right corner you can see (for debug reasons) how many ms the calculation took. For VGA and LCD, the time is set to 120 ms. So it doesn't make any difference, for the game speed, which Version you use.
Only the image "painting" of the LCD version is significantly slower (which is done by the 2nd CPU). Therefore, in the version, especially in horizontal scrolling,a delay can be seen from time to time. This doesn't happen with VGA and doesn't detract from the fun of the game.

EDit:I just noticed that I have a small error in the controller query..
should be
Function contr_input$()
If Not game_mite Then Contr_input$="":Exit Function

then the input via the Game*Mite also works.

Have a good Sunday
Edited 2023-11-05 18:33 by Martin H.
'no comment
 
Martin H.

Guru

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

next Mod with sfx to fit in the Modbuffer:

rushin_in-sfx-c.zip
Now only one is missing
-----------------------------------
Just added the Game*Mite Controlls to the LCD Version
So If you autostart the Program, it be a handheld game on Game*Mite

pet23cLCD.zip

hope I've covert evey Possibility

"DOWN "       : c2k$=Chr$(129)'down
"UP "         : c2k$=Chr$(128)'up
"LEFT "       : c2k$=Chr$(130)'left
"RIGHT "      : c2k$=Chr$(131)'right
"BUT-A "      : c2k$="m"      'A
"BUT-B "      : c2k$="z"      'B
"START "      : c2k$=" "      'Start
"BUT-B BUT-A ": c2k$=Chr$(9)  'Tab
"DOWN BUT-A " : c2k$="s"      'Fire Down
"UP BUT-A "   : c2k$="w"      'Fire Up
"LEFT BUT-A " : c2k$="a"      'Fire Left
"RIGHT BUT-A ": c2k$="d"      'Fire Right
"UP BUT-B "   : c2k$=Chr$(145)'F1
"DOWN BUT-B " : c2k$=Chr$(146)'F2
"SELECT "     : c2k$=Chr$(27) 'ESC

Requests for changes and suggestions are welcome

The only program that is currently on A: which austostarts is my "autoexec.bas"

Drive "b:"
Chdir "/Petrobot23"
Run "Pet23cLCD.bas"

Edited 2023-11-06 02:40 by Martin H.
'no comment
 
Martin H.

Guru

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

changed start menu
some Fade in / out changes
Key "Y" also acts like "Z"
pet23d.zip
'no comment
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4247
Posted: 08:43am 06 Nov 2023
Copy link to clipboard 
Print this post

@Martin,

Have you tried on VGA ?
I get syntax error on "FRAMEBUFFER WRITE sc$" (where sc$="N" or "n"), but FRAMEBUFFER WRITE N works.
Both RC12 and RC14

Volhout
Edited 2023-11-06 18:43 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Martin H.

Guru

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

to run bleeps Version,
I had to Update the Game*Mite to RC14 to get rid of
Syntax error on "FRAMEBUFFER WRITE sc$"
But this was the non VGA Version..

On PicoMite VGA I use RC10 at the Moment.
By now, the pet23d.bas doesn't use sc$ for switching the Framebuffer mode
Edited 2023-11-06 19:11 by Martin H.
'no comment
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4247
Posted: 09:19am 06 Nov 2023
Copy link to clipboard 
Print this post

There is a new VGA version (see 50708 beta release thread) Peter just issued.

Please convert your pet23d changes to Kevins version.
This is the sublime moment to come to one program that runs on both platforms.

Thank you,

Volhout
PicomiteVGA PETSCII ROBOTS
 
Martin H.

Guru

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

  Volhout said  There is a new VGA version (see 50708 beta release thread) Peter just issued.

Please convert your pet23d changes to Kevins version.
This is the sublime moment to come to one program that runs on both platforms.

Thank you,

Volhout

ok I took Kevins Version and added the Changes from the last 3 days. I hope I haven't forgot something

pet23dl.zip
Edited 2023-11-06 22:48 by Martin H.
'no comment
 
Martin H.

Guru

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

and now for something completely different
since v 23 the program runs into an error with the program from time to time.
(not just with my last version)

'no comment
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4247
Posted: 01:19pm 06 Nov 2023
Copy link to clipboard 
Print this post

Martin,

I think it is since pet23b.
I expect this is a result of a change I made after your remark "I did not know Robots can also shoot canisters". I may have introduced the error myself. I will look into this tonight.

Regards,

Volhout
PicomiteVGA PETSCII ROBOTS
 
Martin H.

Guru

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

  Volhout said  Martin,

I think it is since pet23b.
I expect this is a result of a change I made after your remark "I did not know Robots can also shoot canisters". I may have introduced the error myself. I will look into this tonight.

Regards,

Volhout



I just realised that I forgot to re-enter to stop the Music when loading the End card and play the "music/lose.mod" (if not all robots are killed ;-) )
but thats just a small change in the "end_game" sub.
I like how it is growing from this



to this


 

 
Edited 2023-11-06 23:35 by Martin H.
'no comment
 
     Page 23 of 38    
Print this page
© JAQ Software 2024