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 27 of 38 | |||||
Author | Message | ||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1114 |
252 000 but the "tearing" between the tiles seem to come from the serial connection of the LCD. So, CPU clock speed is not so relevant The serial transfer to the display is simply not fast enough. I had the idea to only transfer what has changed, but there has been no time to work it out cleverly so far. In addition, the 2nd CPU is now used for the transmission. I think, considering that it's actually the VGA version, it doesn't look too bad on the LCD Edited 2023-11-14 20:07 by Martin H. 'no comment |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4043 |
The serial transfer to the display is simply not fast enough. I had the idea to only transfer what has changed, but there has been no time to work it out cleverly so far. In addition, the 2nd CPU is now used for the transmission. I think, considering that it's actually the VGA version, it doesn't look too bad on the LCD OK, thanks for confirming that I am not alone in my observation. I thought we/Peter had this issue resolved with copying in the background and making sure that we didn't try to update the display faster than that background copy takes ? ... or is that not implemented in this "VGA version". Anyway, I agree it is acceptable if nothing can be done about it, and for the moment will lapse back into lurk mode on this project . Keep up the good work folks. Best wishes, Tom Edited 2023-11-14 20:11 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4247 |
Small update during lunch break... You can now stuff all your garbage in the trash compacter... But it still can't crush the player... Regards, Volhout. pet24c.zip P.S. in the LCD version there is no sync between writing framebuffer (the game) and redrawing the LCD (2nd CPU) like there is (now) in the VGA version by using FRAMEBUFFER WAIT. Maybe this is causing the tearing, not as much as writing to framebuffer itself. The write to framebuffer itself is very fast. So there is not a lot you can do in MMBASIC side. Except this FRAMEBUFFER WAIT... maybe that can be implemented in LCD version also when FRAMEBUFFER MERGE is active. Edited 2023-11-14 21:58 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 511 |
Hi Harm, Where I have used the background copy on other graphics intensive code, I have attempted to place the background copy in a place, just after the last screen write operation and then attempted to move the next screen write as far away as possible, so that the copy has as much time to finish, before any further screen changes are made, I'll have a look, see if I can move the background copy to somewhere nicer, though it is so screen intensive, it may not be feasable. Regards, Kevin. |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1114 |
Regards, Kevin. H i Kevin maybe befor the Do ... Loop Until Timer>h_beat would be a nice place would it be faster if you just copy/merge the Play Area? (264*168 Pixel) And refresh the border, as there is not so much action just once in a second? Just an idea Edited 2023-11-15 01:15 by Martin H. 'no comment |
||||
Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 511 |
Hi Martin, Yes effectively it is already doing your first suggestion, as the update is done at the end of the outer Do loop, so just before the section of code you show, however only copying the active portion of the screen. I can't now remember if that was a possibility with the background copy or not, I'll have to go and dissect the Beta thread. Regards Kevin Edited 2023-11-15 01:53 by Bleep |
||||
Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 511 |
Hi, Could anyone with an interest try this version of pet24c, I have moved the plotting of the moving world to be after the player calculations. It appears to me to be an improvement, on the LCD, but I don't know if this will cause other problems. Unfortunately the Buffer Merge command is rather useful, in that is merges the two full frame buffers, including transparency and sends it to the screen all in one go and in the background, but you have to do the full frame, there are no size parameters like blit and trying to do partial screen updates with blits and copies took way longer, plus there wasn't a background option, all of this is to the best of my searching knowledge, unless someone knows better? Regards, Kevin. pet24cMod.bas.zip Harm, Assuming this works out, I have left the original code where it was, commented out and duplicated it just after where scan_units is called from, if you do a diff, it's fairly straightforward. Regards, Kevin. |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9128 |
How much of the screen needs to be updated in the merge? I can look at a BLIT MERGE command if it is going to make a huge difference Something like: BLIT MERGE colour, x1, y1, w, h, [,B/R/A] [,time] |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9128 |
Kevin Please could you try the attached PicoMite.zip As above the new syntax is: BLIT MERGE colour, x, y, w, h, [,B/R/A] [,time] This just overwrites the bit of the physical screen defined by x,y,w,h with the merged combination of that area from F and L Edited 2023-11-15 05:46 by matherp |
||||
Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 511 |
Hi Peter, Ok will do, I won't be able to look at it till tomorrow evening now, but I'll let you know as soon as I can. :-( Thanks for the update. Regards Kevin. PS the answer to your question was 264x168. Edited 2023-11-15 05:51 by Bleep |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4247 |
Coming closer to a release candidate now... This is tested on VGA only, so Kevin/Martin, please check if this is also usable on LCD. This version has - better "chasing" algorithm for aggressive hoverbot and evilbot. - evilbot at medium speed. Watch out: have a medkit ready because 1 slice of it's scissors and you loose 6 life. 2 cuts is immediate death. pet24d.zip I checked the NES controller, and it works in this version (set nesPG1=1 in line 5). Happy gaming.... Volhout P.S. cheat keys F3,F4 and F5 still work.... Edited 2023-11-15 07:03 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4043 |
Observation, the NES initialisation code is doing this: setpin gp14,dout:pin(gp14)=1 'power for the NES controler I've never found that necessary, though I hesitate to call it "nonsense" given I'm still very much a beginner when it comes to hardware. GP14 is connected to Pin 6 on the DB9 port (but only so it can be used to read the FIRE button on an Atari Joystick). When an NES controller is attached, Pin 6 is the power supply to the controller, and that power is coming from the 3v3 supply that is also attached to that pin (via a 150R resistor), not from GP14 on the Pico. Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2136 |
It was a long time ago so I may be wrong but I think the idea was to cater for all variants of the NES controller. The 150R prevents a short if the wrong controller is plugged in. For controllers that need the full 3.3V GP14 provides it. |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1611 |
That rings a bell. I searched: Bill Keep safe. Live long and prosper. |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1114 |
the goal would be the SNES Controller,which I dont have right now. source: PetsciiRobots user Manual if they work with 3.3V The way it is connected is identical to the NES, only the software has to evaluate 12 bits instead of 8, The controls on the GameMite or NES controller are already a compromise, as there are too few buttons, but they are still playable (Control via a single Atari joysticks is not provided because they simply have too few buttons) for control, you can always use the keyboard instead of the controllers Cursor Move A W S D Fire Z SEARCH M Move SPACE USE TAB cycle Map Mode F1 cycle through weapons F2 cycle through items Edited 2023-11-15 16:30 by Martin H. 'no comment |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1114 |
I checked the NES controller, and it works in this version (set nesPG1=1 in line 5). Happy gaming.... Volhout somhow the changes in the c2k$ Function didn't made it to the D Version?! so the combination of buttons didn't work NES delivers the output in a different order, so the possible combinations have to be queried at the moment. It's not elegant, but it was important to me that it works at all. so for Using NES Controller it should be like this: Function c2k$() Local c$,tmp$ If nesPG1 Then c$=nes_input$() Else c$=contr_input$() EndIf If c$<>"" Then Select Case c$ Case "DOWN " : c2k$=Chr$(129)'down Case "UP " : c2k$=Chr$(128)'up Case "LEFT " : c2k$=Chr$(130)'left Case "RIGHT " : c2k$=Chr$(131)'right Case "BUT-A " : c2k$="m" 'A Case "BUT-B " : c2k$="z" 'B Case "START " : c2k$=" " 'Start Case "BUT-B BUT-A ","BUT-A BUT-B ": c2k$=Chr$(9) 'Tab Case "DOWN BUT-A " ,"BUT-A DOWN " : c2k$="s" 'Fire Down Case "UP BUT-A " ,"BUT-A UP " : c2k$="w" 'Fire Up Case "LEFT BUT-A " ,"BUT-A LEFT " : c2k$="a" 'Fire Left Case "RIGHT BUT-A ","BUT-A RIGHT ": c2k$="d" 'Fire Right Case "UP BUT-B " ,"BUT-B UP " : c2k$=Chr$(145)'F1 Case "DOWN BUT-B " ,"BUT-B DOWN " : c2k$=Chr$(146)'F2 Case "SELECT " : c2k$=Chr$(27) 'ESC End Select EndIf End Function 'no comment |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4247 |
Oops.. Will be in the next release. I just checked walking around and not the button combinations. I used the NES controller depicted in the post above. It was send to me by Tom, to test for the "9'th clock" that some controllers need. Good that you found it... Volhout Edited 2023-11-15 17:19 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1114 |
I just checked walking around and not the button combinations. I used the NES controller depicted in the post above. It was send to me by Tom, to test for the "9'th clock" that some controllers need. Good that you found it... Volhout I added it here and also changed the Start menu for better responding on controllerinput Now "Select MAP"and "Difficulty" are much better usable with Controller pet24ds.zip Edited 2023-11-15 18:24 by Martin H. 'no comment |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4247 |
Hi Martin, Will be in the new release. Also improved the ticker banner, 2 pixel scroll (bit slower) and for VGA framebuffer wait. Volhout PicomiteVGA PETSCII ROBOTS |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1114 |
Will be in the new release. Also improved the ticker banner, 2 pixel scroll (bit slower) and for VGA framebuffer wait. Volhout Sounds good, but please use the 24DS version as a basis to implement your changes. Otherwise, other little things that have been changed are missing again. 'no comment |
||||
Page 27 of 38 |
Print this page |