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 17 of 38 | |||||
Author | Message | ||||
Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 512 |
Hi everyone, Could it be that I have shorted out the 3v3 voltage regulator on the LCD/SD card, to be sure it is getting the full 3v3 from the GameMite? Otherwise I have no idea, the SD card being used maybe? Also, you can't mix and match the .lib you can only use my .lib with my ziped up files, or Volhout .lib with his ziped up files, because of the indexes. Regards Kevin. PS as I'm now back from my MTB ride, I'll have a look at using framebuffer merge 9,r and then use the Framebuffer sync, to see if that cures the MOD playing. Edited 2023-10-20 01:22 by Bleep |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4043 |
I don't understand why/where this LIBRARY issue got conflated with problems reading the SD card whilst updating the display in the background (which isn't happening in Martin's example). Also AFAIK @lizby hasn't got a Game*Mite so this probably isn't specific to that H/W. I suppose the initiating event could be a more general problem reading from the SD card but I don't understand why that would be restricted to LIBRARY DISK LOAD. I would guess it is to do with a particular combination of OPTIONs or the history of what actions the user has performed before, e.g. Martin's original post showed a LIBRARY DELETE occurring immediately before a LIBRARY DISK LOAD. YMMV, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1114 |
Thank you Tom, I managed to load the Lib, by first copying it to SD and than write to Lib... But I dont care ant the Moment.. I reflashed the Gamemite to GameMite-1.1.0-full. I'm concentrating again on the VGA version, and try to Support Volhouts work as good as I could, couse I want to see this Program running on the Pico.And I don't have to worry about if my requests being misunderstood. Edited 2023-10-20 03:31 by Martin H. 'no comment |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4247 |
I have no idea where this comes from. I just erased my VGA mite (clear flash), installed RC10, configured all options (SD card, Modbuffer, audio, cpu speed). OPTION COLOURCODE ON OPTION KEYBOARD US OPTION CPUSPEED (KHz) 252000 OPTION SDCARD GP13, GP11, GP12, GP10 OPTION AUDIO GP6,GP7, ON PWM CHANNEL 3 OPTION MODBUFF 128 I unzipped the ZIP with pet19.bas. Clean installed the library (pet_lib.bin). Started pet19.bas No problems. I do not get any error message about w and h out of range. Line 342 is an END SUB. Did you run a different version of the program ? pet18xxx.bas ? Regards, Volhout Edited 2023-10-20 03:33 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4043 |
Looking back, is it a case of it fails (goes into infinite reboot) if the file being loaded into the library is on A: (I think that is what Martin did) but succeeds if it is on B: (which is what Peter did) ? I'd try it myself but don't have a Game*Mite with me. Tom Edited 2023-10-20 03:34 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4247 |
I do work on B: drive since I create a lot of debug logs and A: would fill up to fast. Maybe saving to library from A: is causing the issue? EDIT: NO, just tried it. Loading the lib from A: works fine. No reboots, no errors. Volhout Edited 2023-10-20 03:40 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1114 |
try bleeps lib but i tested both ... same result Edited 2023-10-20 04:18 by Martin H. 'no comment |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9129 |
Please try the attached. PicoMite.zip Mod file playback AND TOUCH should now be compatible and safe with background merge, continuous merge, and background copy. Reading and writing the A: drive should be no issue although writing may cause slight stalls. However, it looks completely impossible to get SDcard activity compatible with CPU2 SPI usage without massive stalls and I haven't and won't try and code an interlock between trying to use the SD and background updates as there are just too many places where it would need to be checked and it could only error anyway. Don't know what the library issue might have been - no issues at all at my end (A: or B:). I was using the wrong library with the wrong Basic program hence the csub issues but that is totally irrelevant but either version of the library load fine The new firmware uses a mutex to arbitrate the SPI bus between touch and background TFT updates My test code, enable background update or continuous update as you wish with the commented out bits Play modfile "b:/ptetris" FRAMEBUFFER create 'create a framebuffer FRAMEBUFFER layer ' and a layer buffer FRAMEBUFFER write f 'set graphics output to the framebuffer Load image "b:/mandelbrot" ' and load a picture 'FRAMEBUFFER merge 0,R,100 'now start a continuous update for the screen on CPU 2 FRAMEBUFFER write l We will leave the framebuffer alone And just write To the l ayer i=100 j=100 Do Do 'creat a random origin for a circle staying on the screen x=i+Rnd()*6-3 y=j+Rnd()*6-3 Loop While x<50 Or x>MM.HRes-50 Or y<50 Or y>MM.VRes-50 FRAMEBUFFER merge 0,b ' FRAMEBUFFER sync 'sync to the framebuffer write to avoid artefacts a=Touch(x) If (a<>-1) Then Print a,Touch(y) Box i-51,j-51,102,102,,0,0 ' clear the previous image Circle x,y,50,5,,RGB(red),RGB(blue) 'write a new image i=x j=y Loop As before the only solution to the SDcard issue is a parallel display or different pins for the SD - something to think about for the future Edited 2023-10-20 04:24 by matherp |
||||
Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 512 |
Hi Everyone, The library thing is very strange, I just had a hard reset, (nothing to do with libries), so had to reset everything. PicoMite MMBasic Version 5.07.08RC10 OPTION SYSTEM SPI GP6,GP3,GP4 OPTION LIBRARY_FLASH_SIZE 21000 OPTION COLOURCODE ON OPTION CPUSPEED (KHz) 252000 OPTION LCDPANEL ILI9341, RLANDSCAPE,GP2,GP1,GP0 OPTION TOUCH GP5,GP7 OPTION SDCARD GP22 OPTION AUDIO GP20,GP21, ON PWM CHANNEL 2 OPTION MODBUFF 128 I then used Volhouts zip, as his is the master as far as I am concerned. Library loaded perfectly from B: first time. I then ran my lcdpet.bas, (attached) with FRAMEBUFFER merge 9,b in the main player DO loop and got this result, MOD stops playing as soon as game starts. PetRobot sound fault. Oh bugger Peter got in there before I'd finished! I'll try again and report back. I then modified my version to lcdpetb.bas, (attached) which uses the FRAMEBUFFER merge 9,r,100 outside the main player DO loop, all now good, as you can see the code is taking about 45mS so a reasonable amout of spare, at 378MHz it's about 25mS so lots of spare time. :-) PetRobot working ok. :-) Regards Kevin. lcdpetb.zip Edited 2023-10-20 04:39 by Bleep |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9129 |
That was a bug that should be fixed in the firmware posted above I'm try to run the code but missing "hit_index.txt" can anyone point me to a download with it included please |
||||
Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 512 |
Hi Peter, Yes sorry, your new version went up as I was typing mine. :-( Have tested your latest with FRAMEBUFFER merge 9,b in the main player DO loop and sound is now good thanks. :-) Stress testing at 378MHz all good, frame calculation time is about 27mS, so a little bit of scope for extra game logic. ;-) |
||||
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3150 |
I also am still getting the repeated "resetting" after LIBRARY DISK LOAD. I'm using Peter's latest from 4 posts above and Bleep's library that Martin linked to in the post above that. Here's my OPTION LIST (I don't have sound or touch configured): option list PicoMite MMBasic Version 5.07.08RC10 OPTION SYSTEM SPI GP18,GP19,GP16 OPTION DISPLAY 50, 120 OPTION LCDPANEL ILI9341, RLANDSCAPE,GP21,GP20,GP17 OPTION SDCARD GP2 I get the resetting even when the Pico is not plugged into any PCB. (Tom--I do have Game*Mite PCBs, but don't have all the parts yet, so haven't soldered it up--and I'm keeping in mind the issues with the tented vias.) PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1114 |
Fine, looks even better than before. I am About to Add the difficulty Part to the startmenu/intro. Visualy I just have to paint 3 Robot faces as mini BMP load them at the place where the original face is shown, by selecting one of the three difficulty levels. I noticed that the key cards seem to have the wrong Y height. But other than that, it's becoming more and more of a really good game. Keep it up. Mart!n 'no comment |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9129 |
I think this now has to be a H/W issue. It would appear the library is not writing accurately or in the correct place. Have you tried clearing the flash completely (nuke) and starting again? I attach the clear flash program in case you haven't got it. If that doesn't work try on another Pico starting with clear flash. What are you using as a development system? Your options look similar to Mick's board that I'm using but not quite the same. Clear_flash.zip Request Please can someone post a complete directory of all files needed to run the VGA version and/or bleep's LCD version. I'm trying to test firmware and optimise it but can't seem to piece together a working set of files Edited 2023-10-20 17:23 by matherp |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1114 |
I managed to load the Library, but only when it is stored on SD Card, A freshly unpacked Pico doesn't have an SD card installed yet, when loading the lib from A: I get the endless boot. Flash _ Clear has to be done every Time after it went to the endless loop. Just reflashing PicoMite doesn't help. So the way it ssems to work is Flash clear, (re)Install PicoMite. Set the options that the SD Card could be read. go to the LIB Dir on B and install the Lib using LIBRARY DISK LOAD. Edited 2023-10-20 17:39 by Martin H. 'no comment |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4247 |
Hi Martin, You can install the MSDOS freeware version, and use that to cut the robot faces from. All, This is the second, and last in the pet19 series. It took me serious time before I understood the problem in showing the plasme and pistol shots on screen. And now I know what was causing this problem, I have some serious re-structuring of the game to do. Background info: Throughout the game loop I update the L layer (this is also true for the N layer, but to lesser extend). Some updates come from AI, som updates from key presses. But now the AI section is taking more and more time to process (as predicted) sprite updates sometimes start flashing. To counter this I need to do all L layer screen updates AT THE SAME TIME (more or less). So this is the last release in the "chaotic" series. The new series will be pet20, and use following top level structure. do scan keyboard in heartbeat tick 'no change writeworld 'repositioned writesprites 'new, places all UNITS on L layer, also player process keys 'repositioning in main loop process AI 'stripped of all screen activity loop This would ensure all sprites are visible throughout the whole game loop. It however enforces me to use the UNIT ATTRIBUTE array to store all AI info changes, so they can be used by writesprites(). This is the major undertaking. Here is the last of the 19 series. You can shoot weapons (pistol, plasma) once you found them, but do not cause any damage yet. The gun shot stops at anything that can be damaged (container, grass?, bridge parts) or is ignorant to the shot (i.e. walls). The shot does not hit robots. This is where I was when I realized I needed a structural change... pet19a.zip Volhout Edited 2023-10-20 17:38 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9129 |
How are you getting the library onto the A: drive without an SDcard configured? If xmodem, it could be the padding character that it puts at the end that are causing the problem (clutching at straws) |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4247 |
Hi Peter, I have an SD card in the system. To verify you can install from the A: drive I did: COPY B2A "pet_lib.bin" to "pet_lib.bin" Then took out the SD card Reboot LIBRARY DELETE LIBRARY DISK LOAD "pet_lib.bin" Re-inserted the SD card And ran the program from SD card. Volhout PicomiteVGA PETSCII ROBOTS |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4247 |
@Peter, petrobot.zip This is from a post 2 pages back on the forum, that contains everything you need to run the program on the VGA mite. It is made to work with RC10 on a VGA picomite (your 1.7 VGA platform -or- Mick/Tom's 1.4 VGA_game_mite). Volhout Edited 2023-10-20 18:20 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 512 |
Hi Peter, I use Volhout zip from the top of page 16 of this thread, that should be a complete VGA. If you want to try it on LCD then a few posts back I posted a zip lcdpetd.zip which has 2 variations, one for continuous refresh, & the other for ad-lib refresh. Regards Kevin. |
||||
Page 17 of 38 |
Print this page |