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 V5.09.00 betas: Sorting out SPRITE and BLIT + USB variants
Page 5 of 9 | |||||
Author | Message | ||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9115 |
There is no difference to 5.08.00. You have a spurious extra parameter on the command |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
Testing v09.b1 vga usb and picomite ili9341 usb and picorocks works and other frame/layer code. |
||||
Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 509 |
Hi Peter, Another potential problem with 5.09.B. I am using your VGAUSB, board whenever I load a file from either A: or B: the USB keyboard stops working, requiring a reset to get it back. I did initially think it was because I am using 378MHz, but I have tested at 252 and 126MHz and get the same result. PicoMiteVGA MMBasic USB Edition 5.09.00b2 OPTION SERIAL CONSOLE COM2,GP8,GP9 OPTION SYSTEM I2C GP14,GP15 OPTION FLASH SIZE 16777216 OPTION COLOURCODE ON OPTION KEYBOARD US OPTION PICO OFF OPTION SDCARD GP13, GP10, GP11, GP12 OPTION VGA PINS GP23,GP18 OPTION AUDIO GP16,GP17', ON PWM CHANNEL 0 OPTION RTC AUTO ENABLE OPTION MODBUFF ENABLE 180 I seem to remember this was a potential problem with a LCD screen, but I didn't think it should be a problem with a VGA. Regards, Kevin. PS I have been running Petscii robots flat out at 378MHz all afternoon with no ill effects. |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9115 |
Kevin I can't replicate. Both the types of keyboards I've got work perfectly after loading the biggest file I have available (solar_eclipse - 70272 bytes) |
||||
Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 509 |
Hi Peter, Ok thanks for checking, I'll dig out another keyboard. Another keyboard later, yep that's working, so.... The keyboard that doesn't like file loading has a built-in hub, so that I can connect a mouse, into the keyboard, without having to have a separate hub, what happens to file loading if you have your keyboard on the other side of a hub? Thanks for testing. Regards Kevin. |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9115 |
No problem with an unpowered hub. Powered hubs don't seem to be very well supported by TinyUSB as they maintain some sort of context while unplugged that doesn't seem to transfer to the Pico host when it is reset or powered up |
||||
Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 509 |
Hi peter, I didn't think I had a hub, but I dug a dusty one up and get the same as you, so it must just be a crappy keyboard :-( oh well it was a nice thought I could get away without a separate hub. In one way it't better as the failing keyboard is US layout. Regards Kevin. |
||||
Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 509 |
USB keyboards again, I found out how to change the keyboard hold and repeat rates, however is there a way of defaulting to numlock to off, as currently it defaults to on? Regards Kevin. Edited 2024-02-19 05:49 by Bleep |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
I tried this usb kb with 2 usb ports on the back, works ok with picomite usb. |
||||
javavi Senior Member Joined: 01/10/2023 Location: UkrainePosts: 213 |
Hi Volhout & All You asked to post PicoMan working on PicoMiteVGA 5.09.00b0 For the NES joystick to work on your hardware, you may need to correct the assignment of port numbers in the program. PicoMan_NES_joy.zip |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
using vga and new? sprite and frame. before the sprites I used box 0 to erase and very fast but using frame layer L was slower but smooth. now it's framebuffer layer 0 and it's much faster than before like using box erase. I'll try ili9341 picomiteUSB FRAMEBUFFER CREATE F FRAMEBUFFER LAYER 0 'L just this has changed?? FRAMEBUFFER WRITE L cls RGB(black) FRAMEBUFFER WRITE f do 'demo moving sprite FRAMEBUFFER COPY l,f for temp=0 to 15 ' if sprite_status(temp)=1 then 'is sprite active if spx(temp)> 300 then 'check right edge dx(temp)= 0-dx(temp) elseif spx(temp)<8 then 'check left edge dx(temp)= 0-dx(temp) end if if spy(temp)>220 then 'check bottom edge dy(temp)= 0-dy(temp) elseif spy(temp)<8 then 'check top edge dy(temp)= 0-dy(temp) end if ' spx(temp)=spx(temp)+dx(temp):spy(temp)=spy(temp)+dy(temp) 'get new position for draw ' if frame=0 then'which sprite to draw sprite WRITE 1,spx(temp),spy(temp) 'draw sprite1 at new position else sprite WRITE 2,spx(temp),spy(temp) 'draw sprite2 at new position end if next temp FRAMEBUFFER COPY f,N |
||||
vegipete Guru Joined: 29/01/2013 Location: CanadaPosts: 1109 |
Would the following be feasible and would it be generally useful? How about a command to shift array elements? MATH SHIFT inarray(), shiftval, outarray() shiftval is how many places to shift, left or right. Bonus if rotation (like a circular queue) were optionally possible too. For example, MATH SHIFT yval(),1,yval() would do the job oftmp = yval(MAXY) although hopefully significantly faster.for i = MAXY to 1 step -1 yval(i) = yval(i-1) next i yval(0) = tmp ' data rolls 'yval(0) = 0 ' data shifts My use case? I'm thinking of scrolling background mountains, as seen in, for example, BattleZone. The LINE GRAPH function will do the drawing. There's a left over vertical line on the (right) edge if the x-coordinates go past the edge of the screen, but that is fixable. This might also be useful for oscilloscope like displays - think roll mode. Visit Vegipete's *Mite Library for cool programs. |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9115 |
You can already do this with MEMORY COPY |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9115 |
Version 5.09.00b3 https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip All versions: Fixes bug in LINE command when using integer arrays or integer array elements SPTITE MEMORY is automatically converted to BLIT MEMORY for backwards compatibility (PETSCII tested) PicoMite, PicoMiteUSB and WebMite only: Completes support for 16-bit displays pinout for the 16-bit displays is always: GP0-GP15 = DB0 to DB15 GP16 = RS/DC GP17 = WR GP18 = RD GP19 = RESET You can use the optional parameter NORESET to free up GP19 in which case the RESET pin should be tied high or connected to the RUN pin. The optional parameter DCPin is ignored for 16-bit displays. Both DCPin and NORESET are available for 8-bit parallel displays. OPTION LCDPANEL displaytype, orientation [,BacklightPin][,DCPin][,NORESET] Valid 16-bit displays are: ILI9341_16, IPS_4_16, SSD1963_4_16, SSD1963_5_16,SSD1963_5A_16, SSD1963_7_16, SSD1963_7A_16, SSD1963_8_16, SSD1963_5ER_16, SSD1963_7ER_16, New command OPTION LCD320 ON/OFF This enables or disables 16-bit displays in 320x240 mode allowing things like games on these larger displays In the case of 800x480 displays the 320x240 image is scaled by 2 and occupies the screen area 80,0 to 719,479 In the case of 480x272 displays the 320x240 image is windowed and occupies the screeen area 80,16 to 399,255 New sub-function MM.INFO(LCD320) Returns true if the display is capable of 320x240 operation using the OPTION LCD320 command. So: In a game just include the statement if MM.INFO(LCD320) THEN OPTION LCD320 ON In any games that run in 320x240 resolution to allow them to use these bigger displays Edited 2024-02-27 21:18 by matherp |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4233 |
Hi Peter, Running 50900b3 on VGA (non USB) Using floating point arrays MATH C_ADD a(),w(),a() works MATH C_MUL a(),w(),a() syntax error Can you fix this ? I want to use MATH C_MUL to apply a pre-calculated Hann window w() over data a() before going to FFT. Regards, Volhout P.S. it is realy amazing how powerfull these new commands are (MATH and LINE GRAPH). I am running (being it over a small data set) 100 FFT's per second (unwindowed) including displaying them on screen in a graph. Amazing... Edited 2024-02-28 19:35 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9115 |
C_MULT works, either the code or the manual need fixing Edited 2024-02-28 19:59 by matherp |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4233 |
Thanks, Manual says C_MUL, not C_MULT. Manual needs fixing. Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9115 |
I'll change the code in 5.09 as it is more syntactically consistent |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4233 |
Hi Peter, I have a question about MATH(CHI a()). In this code DIM a(1,1) PRINT MATH(CHI a()) I get "INF" as answer. "Probably" because all elements in a() are zero. DIM a(1,1)=(1,1,1,1) PRINT MATH(CHI a()) I get 0, which is correct. But now the situation gets strange. Lets set OPTION BASE 1 OPTION BASE 1 DIM a(2,2)=(1,1,1,1) PRINT MATH(CHI a()) The result is "INF". It feels like OPTION BASE 1 does not work with the CHI function. I hope I am not confused.... Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9115 |
No: its a bug - will fix |
||||
Page 5 of 9 |
Print this page |