![]() |
Forum Index : Microcontroller and PC projects : CMM2: V5.05.06RC7
![]() ![]() |
|||||
Author | Message | ||||
LeoNicolas![]() Guru ![]() Joined: 07/10/2020 Location: CanadaPosts: 499 |
There is an issue with the math v_mult command. If we use the same array to the in argument and the out argument the out values will be wrong. math v_mult matrix(),vertices(),vertices() |
||||
chris Regular Member ![]() Joined: 24/08/2020 Location: United KingdomPosts: 56 |
I wonder if this is fast enough so that the Wolfenstein BASIC port can use real texture mapping now? |
||||
jirsoft![]() Guru ![]() Joined: 18/09/2020 Location: Czech RepublicPosts: 533 |
Hi Peter, I lost twice on RC15 and RC16 program including backup. It was after copying whole row in EDITOR, some strange chars appeared instead of correct ones on the end of the line, then CMM2 colapsed with firmware error message and program and backup had 0 bytes length. No CSUBs in the code... Jiri Napoleon Commander and SimplEd for CMM2 (GitHub), Â CMM2.fun |
||||
qwerty823 Newbie ![]() Joined: 30/07/2020 Location: United StatesPosts: 30 |
I haven't lost a file yet, but earlier I had some strange chars in a file I was editing on RC15, so I second what Jiri had happen. Also, no CSUBS, but I was using a MEMORY SET to see if that could clear the screen faster, but it happened even after commenting it out (and I'm pretty sure it had the address and sizes right, as it WAS working, just not really any faster). Edited 2020-11-11 08:19 by qwerty823 |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10000 |
If you are seeing editor issues please report exact configuration of options |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6212 |
I always knew my dog was a bit warped: ![]() MODE 1,16 LOAD JPG "face" FOR n = 0 TO 390 STEP 10 shift = SIN(RAD(n))*20+20 shift2 = SIN(RAD(n+10))*20+20 IMAGE WARP_H n,0,10,390, 400+n-1,shift,390, 410+n-1,shift2,390 NEXT n DO:LOOP UNTIL INKEY$ <> "" Jim VK7JH MMedit |
||||
PeteCotton![]() Guru ![]() Joined: 13/08/2020 Location: CanadaPosts: 523 |
.... Do you ever sleep? Another amazing update! Thank you! ![]() ![]() ![]() |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10000 |
This should give an error, the arrays should not be the same - will do in next release |
||||
MauroXavier Guru ![]() Joined: 06/03/2016 Location: BrazilPosts: 303 |
The answer is: yes and no. No, if I continue using a classic raycasting can't be considered as a real texture mapping and one of the main "CPU eater" is the excessive loops of the classic raycast implementation. Yes, anyway it can be faster if I change the raycast to make slices in a way to use the warped textures to follow the perspective. At least I believe it can bring better quality to the rendering. But the best approach that I will try is to rewrite all the engine to not use the classic raycast algorithm and see if the there is a speed improvement, and principally if the render quality can be upgraded to show the textures at the PC level. |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10000 |
Another matrix manipulation in V5.05.06RC17 http://geoffg.net/Downloads/Maximite/CMM2_Beta.zip This is the opposite of MATH SLICE and allows you, for example, to substitute a single vector into an array of vectors with a single instruction MATH INSERT targetarray(), [d1] [,d2] [,d3] [,d4] [,d5] , sourcearray() e.g. OPTION BASE 1 DIM target(3,4,5) DIM source(4)=(1,2,3,4) MATH INSERT target(), 2, , 3, source() The blank index specifies the slice to be inserted. i.e. the source array elements are copied into it In addition I've optimised further IMAGE RESIZE_FAST when either the heights are the same, the widths are the same or both are the same (NB in the latter case the code is the same as a BLIT command. It should be noted that because of the layout of video memory resizing just the width is much more efficient than just the height or both dimensions at the same time. Check the video - code below: I've added a warning if you start a new selection with an unpasted selection already in the buffer. Just press F4 or Ctrl-S or Shift-arrow again to ignore the warning Finally, I've done more work on the memory management in the editor to try and overcome the issues reported in RC15 and RC16. Please let me know if you still see hit a problem and please report as much detail as possible (default screen mode etc.) mode 1,16 option explicit option default none dim integer sines(61) dim integer i,j,y for i=0 to 60 sines(i)=cint(cos(rad(i*3-90))*8) if sines(i)=0 then sines(i)=1 j=j+sines(i) next i page write 1 load bmp "tiger800" page write 2 cls do j=0 for i=0 to 60 image resize_fast 50,(i*8 + y) mod 480,680,8,25+sines(i)*2,150+j,680,sines(i),1 j=j+sines(i) next i y=y+8 circle 26,304,154,2,0.1,rgb(white),rgb(green) page copy 2 to 0,b loop Edited 2020-11-12 06:02 by matherp |
||||
George H Newbie ![]() Joined: 03/07/2020 Location: United StatesPosts: 31 |
Hi all, new here, CMM1 and CMM2 user. It's probably me, but running RC15, the settick command seems broken. The system stops execution and drops to the command prompt with no error message after executing the settick statement. This silly program: print "hi" settick 5, test print "there" do loop sub test print "this is a test" end sub Print "hihi" Gives 'hi', then drops to the prompt. Expected a screen full of text and infinite loop. What am I goofing up? Thanks, George |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6212 |
It's probably me, but running RC15, the settick command seems broken. The system stops execution and drops to the command prompt with no error message after executing the settick statement. Thanks, George Welcome to the group. Works OK on RC17, so try that before tearing your hair out. Jim VK7JH MMedit |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 3988 |
What happens with a longer settick - maybe 500 - to give it longer? John |
||||
William Leue Guru ![]() Joined: 03/07/2020 Location: United StatesPosts: 405 |
Also, the main program is a tight buzz that is not giving the ISR any CPU time; try adding a small pause in the loop to give the scheduler some time to do its job. -Bill |
||||
George H Newbie ![]() Joined: 03/07/2020 Location: United StatesPosts: 31 |
Thanks all - I did try larger values on settick, no change. Inserted a pause in the do/loop to no effect, but, it apparently never enters it as evidenced by not printing "there" first. Anyway, I'll install RC17 and give it a go. -G |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10000 |
Your program as listed works perfectly on RC15. Check for junk characters in the file or some other typo. Use autosave "ticktest" and then cut and paste your listing above into teraterm then F2 and you will get the expected messages |
||||
George H Newbie ![]() Joined: 03/07/2020 Location: United StatesPosts: 31 |
OK based on that information, I just cycled the power and ran it again, still on RC15, and all is well now. Not sure why, but I'll do that next time before posting in forums. Just for information, this was just a test program - it was also failing in another program I'm playing with, wanting to twinkle a star field on interrupts. I'll run that now, I'm sure it's fine. Thanks all for the replies. Did I mention I love the CMM2? I do! Kudos to all who have contributed to it. -G |
||||
jirsoft![]() Guru ![]() Joined: 18/09/2020 Location: Czech RepublicPosts: 533 |
Hi Peter, I have in EDITOR the RC17 same problem as in RC16. When I run the program I get either Error in line 0: Syntax (on line 0 is just OPTION EXPLICIT) or with other version (I'm saving every after some time new version) I get scrambled text that can't be fixed: FUNCTION NCpath(p AS STRING) AS STRING) will be FUNCTION NCpath(p STRIN A ASTSTNGNG after save. my config is: CURRENT VGA mode 800x600 RGB332 CURRENT DISPLAY 60,100 OPTION BAUDRATE 230400 OPTION USBKEYBOARD US OPTION KEYBOARD REPEAT 500,80 Program is running in MODE 1,16... And sometimes I have scrambled other Jiri Napoleon Commander and SimplEd for CMM2 (GitHub), Â CMM2.fun |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10000 |
Please put the baudrate back to 115200 and see if the problem still occurs. How big is the program? Also, unless you are using teraterm/MMEdit, try OPTION CONSOLE SCREEN, OPTION CONSOLE SAVE |
||||
PeteCotton![]() Guru ![]() Joined: 13/08/2020 Location: CanadaPosts: 523 |
[deleted- posted to wrong thread] Edited 2020-11-13 09:55 by PeteCotton |
||||
![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |