leissler [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=42301 Screen memory remapping not working in multiscreen <p>When using multiscreen mode, the following function (which should print a scaled text) turned out to render only on the first screen:</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>function scale_text(str,x,y,c,scale) memcpy(0x4300,0x0,0x0200) memset(0x0,0,0x0200) -- draw to spr mem at 0x0000 poke(0x5f55,0x00) print(str,0,0,7) -- draw to screen mem again poke(0x5f55,0x60) local w,h = #str*4,5 pal(7,c) palt(0,true) sspr(0,0,w,h,x,y,w*scale,h*scale) pal() memcpy(0x0,0x4300,0x0200) end </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Just like normal printing, I expected this to work in multiscreen with the following calling code:</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>poke(0x5f36,1) scrs_w, scrs_h = 3,1; scr_ix = 0; _camera = camera function camera(x,y) x = x or 0 y = y or 0 local dx=flr(scr_ix % scrs_w) local dy=flr(scr_ix / scrs_w) _camera(x+128*dx, y+128*dy) end function _draw() scr_ix = stat(3) camera(0,0) cls(scr_ix+5) sspr(0,0,24,24,200,30,48,48) print(&quot;hello&quot;,120,80,8) scale_text(&quot;hello&quot;,110,60,12,1.5) return scr_ix &lt; stat(11)-1 end</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>But the result is a cut-off scaled text, while the normal text and the other sspr() call work just fine.</p> <img style="margin-bottom:16px" border=0 src="/media/42301/Screen Shot 2023-05-30 at 21.06.44.png" alt="" /> <p>I think this is a bug in PICO-8, with remapping gfx memory not properly working in multiscreen mode.</p> https://www.lexaloffle.com/bbs/?tid=52917 https://www.lexaloffle.com/bbs/?tid=52917 Tue, 30 May 2023 18:59:53 UTC 0.2.2 crashes when drawing lines <p>Hi,</p> <p>on a Mac (Big Sur) I did some experiments with drawing a 3D starfield using lines.</p> <p> <table><tr><td> <a href="/bbs/?pid=88079#p"> <img src="/bbs/thumbs/pico8_mefuzakofe-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=88079#p"> starfield_test</a><br><br> by <a href="/bbs/?uid=42301"> leissler</a> <br><br><br> <a href="/bbs/?pid=88079#p"> [Click to Play]</a> </td></tr></table> </p> <p>However, PICO-8 regularly crashes completely (play around with the 6 buttons for the star speed in all 3 directions) and a debug with lldb on the Mac terminal uncovered the following:</p> <img style="margin-bottom:16px" border=0 src="/media/42301/crash_line.png" alt="" /> <p>So there seems to be a problem in 0.2.2 with line drawing somewhere.</p> <p>I hope this can be fixed for the upcoming 0.2.2b</p> <ul> <li>Martin</li> </ul> https://www.lexaloffle.com/bbs/?tid=41731 https://www.lexaloffle.com/bbs/?tid=41731 Tue, 23 Feb 2021 23:35:12 UTC Can't INSTALL_GAMES on 0.2.1 <p>On 0.2.1, trying to INSTALL_GAMES with 0.2.1 gives me this error.</p> <img style="margin-bottom:16px" border=0 src="/media/42301/install_games.error.png" alt="" /> <p>INSTALL_DEMOS seems to work fine, though.</p> <p>Might this be connected to the 0.2.1 release notes saying:<br /> &quot;Fixed: Crash when INSTALL_GAMES / INSTALL_DEMOS without a writeable disk&quot;?</p> <p>Platform: macOS Catalina, 10.15.5</p> https://www.lexaloffle.com/bbs/?tid=38676 https://www.lexaloffle.com/bbs/?tid=38676 Sat, 04 Jul 2020 12:48:52 UTC