![]() |
Forum Index : Microcontroller and PC projects : Luner lander dirctionals inverted with new firmwares.
Author | Message | ||||
mclout999 Guru ![]() Joined: 05/07/2020 Location: United StatesPosts: 490 |
I just updated to 5.5.6.B9 (almost 5 MINUTES before the B10 was released, DAMN) now Luner Lander from the welcome tap and the version with Numbchuck support have trust directions and rotation is inverted as well. You use trust and it goes in the other direction and you rotate L or R and it goes the other way. Anyone know what the hell happened there? It does the same thing with keys or the numbchuck. |
||||
vegipete![]() Guru ![]() Joined: 29/01/2013 Location: CanadaPosts: 1132 |
Wow, just tested LunarLander version 72 on firmware 5.05.06b10 and the flipped controls really make it hard. I think the problem is the IMAGE ROTATE command somewhere around line 100. But I can't test yet because the watch dog timer just erased the program on the SD card... ![]() Visit Vegipete's *Mite Library for cool programs. |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
Was this on exiting / running / saving from the Editor ? Did it delete the file, or truncate it to size 0 ? What OPTION SD TIMING are you using ? Sounds like it might be what I reported to Peter earlier in the day https://www.thebackshed.com/forum/ViewTopic.php?TID=12696&P=6#155213 This very occasional bug predates the watchdog timer, it used to delete the file and then hang. Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
vegipete![]() Guru ![]() Joined: 29/01/2013 Location: CanadaPosts: 1132 |
I just reported more about the 'event' (twice, actually) on the '06 beta thread. F2 to save and run. The file still exists, just its size is zero. I kinda suspect my SD card is part of the problem. Using the default SD timing, which I gather is slower. With regards LunarLander, the last parameter of both IMAGE ROTATE commands must be made negative to fix the game. (Change "i*5" to "-i*5") Growl! How do you fix that so that the game works for people with older or newer firmware? Visit Vegipete's *Mite Library for cool programs. |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4044 |
You can test the firmware version. John |
||||
vegipete![]() Guru ![]() Joined: 29/01/2013 Location: CanadaPosts: 1132 |
I don't think you can test specific beta versions. I think it 'broke' with the second release of V5.05.06b6. (2020/Sep/18/01:50am posting) A test involves drawing a pixel, rotating it 90 degrees around another point, and then looking for where the pixel went. When all the dust settles, LunarLander will work as is for firmware release version up to and including 5.05.05 and will need a change for release version 5.05.06 and onward. =========== I think this works: mode 1,8 ' ensure 8 bit colour mode cls pixel 0,1 ' draw one white pixel, left edge middle of a 3x3 region image rotate 0,0,3,3,0,0,90 if peek(byte mm.info(page address 0) + 1) = 255 then ' test for pixel top center <clockwise rotation> else <counterclockwise rotation> endif That's a gnarly bit of code to identify beta 6 or higher but how else do you ensure LunarLander works for all? Edit: I should add, <clockwise rotation> indicates beta 6 or higher. To fix LunarLander, the following should be added/changed: (untested) PAGE WRITE 2 CLS PIXEL 0,1 ' draw one white pixel, left edge middle of a 3x3 region IMAGE ROTATE 0,0,3,3,0,0,90 IF PEEK(byte mm.info(page address 2) + 1) = 255 THEN ' test for pixel top center rotfactor = -1 ELSE rotfactor = 1 ENDIF CLS LOAD PNG "LanderPict.png" ' generate the rotations FOR i = 1 TO 18 IMAGE ROTATE 0, 0,40,40,i*40, 0,i*5*rotfactor IMAGE ROTATE 0,40,40,40,i*40,40,i*5*rotfactor NEXT i Edited 2020-09-21 10:33 by vegipete Visit Vegipete's *Mite Library for cool programs. |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
@vegipete Sorry to resurrect this thread, but 5.05.06RC7 is giving me new grief with Lunar Lander and I was hoping you would be generous enough to confirm what I am seeing and run down the problem ? ... though I think it might ultimately be something for Peter. 1. Install Welcome Tape if not already present. 2. Reset CMM2 3. chdir "welcome/lunar" - or "welcome/games/lunar" if you happen to have the unreleased Welcome Tape 0.5 installed 4. *lunar 5. Game runs fine 6. Quit 7. EDIT "lunar.bas" 8. F2 9. Controls are reversed and the lander sprite is not correctly filled when rotated. 10. Quit 11. *lunar 12. Controls are reversed and the lander sprite is not correctly filled when rotated. Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
vegipete![]() Guru ![]() Joined: 29/01/2013 Location: CanadaPosts: 1132 |
I can't confirm crazy rotation effects, but I didn't really try. Repeated "RUN" from the prompt seemed to work fine. I did notice a different problem - the rotated images are gray instead of white. Something else changed in the IMAGE ROTATE command. I chased this back to the change from version 5.05.04 and 5.05.05 I've attached my solution to all this confusion. I reflashed version 5.05.04, generated the correct rotated sprite images, saved them ALL, made a new sprite sheet with ALL images pre-generated, and updated LunarLander appropriately. Back to version 5.05.06RC7 and it seems to work fine from the prompt. You'll have to work your magic to integrate it with the welcome tape. LunarLander ends on line 335, to make your modifications easier. LunarLander2v73 with pre-generated sprites Please test and let me know. Edited 2020-10-29 09:19 by vegipete Visit Vegipete's *Mite Library for cool programs. |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
Thanks Pete, that seems to fix the rotation bug. I still think there is something subtly and inexplicably different in the sprite colour between a "RUN" from the prompt and an "F2" from the EDITor ... though I'm also beginning to suspect my sanity ![]() I'm going to go with "it's good enough" on the assumption that if there is a firmware issue it will pop up again and Peter can be imposed upon to look at it. Note that for the purposes of the Welcome Tape this is actually "Lunar Lander v7.4" as a "v7.3" was included on the Welcome Tape v0.4. Thanks for your help, Tom Edited 2020-10-29 20:41 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10310 |
There is something but I'm struggling to find it. Does the program in question use any GOSUBs? |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
Sorry Peter, no GOSUBs. Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10310 |
In which case I'm not aware of any issues and anything you are seeing is not what I was chasing so would need you to investigate further. There is a nasty bug in GOSUB I've just found and fixed that manifests when the program is run from the command line, but only the first time. I've also fixed the TTS bug (applies to FLAC and WAV as well). Will be in RC8. |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
Thanks Peter, I'll take another look for this "bug" if I get a chance, but for the moment it isn't even close to being a show-stopper, just a minor irritation. Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
OK Peter, here is a reduced example, I guess reproducing CMM2 firmware bugs is more interesting than the day job. lunar.zip 1. Reset CMM2 2. RUN "lunar.bas" 3. Output is: ![]() 4. EDIT "lunar.bas" 5. F2 6. Output is: ![]() Not only is the rotation "wrong", but the colours of the sprites are slightly different too. And before you say anything it's @vegipete's weird code, not mine ![]() Tom Edited 2020-10-30 00:24 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10310 |
OK Peter, here is a reduced example, Perfect: found and fixed |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |