sugarflower [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=38029 internettime <p> <table><tr><td> <a href="/bbs/?pid=160456#p"> <img src="/bbs/thumbs/pico64_internettime-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=160456#p"> internettime</a><br><br> by <a href="/bbs/?uid=38029"> sugarflower</a> <br><br><br> <a href="/bbs/?pid=160456#p"> [Click to Play]</a> </td></tr></table> </p> <p>I've loved Internet Time ever since I first learned about it in the 1990s.<br /> I'd love to be able to make my own wristwatch like .beat in the future, but for now I'm content with having it run on my beloved picotron.</p> https://www.lexaloffle.com/bbs/?tid=146516 https://www.lexaloffle.com/bbs/?tid=146516 Fri, 10 Jan 2025 07:55:35 UTC touch control for mobile phone <p>Thanks to HTML export, it's now possible to run picotron cartridges on a mobile phone.<br /> However, at present the DPAD isn't displayed, and touch operations are replaced by mouse movements, making operation very uncomfortable.</p> <p>So I wrote the following code to simulate touch operations.<br /> This also led me to notice some strange behavior, but that's another story.</p> <p>I'd be happy if the picotron itself could support touch operations in the future.</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/38029/スクリーンショット 2024-10-25 230504.png" alt="" /> <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 _init() window{cursor=0} -- Hide the mouse cursor tch = touch.new() -- Initializing the touch structure end function _draw() -- Touch Structure Update. This is necessary to determine touch. tch:check() --[[ *** Wait until it truly becomes the initial state *** Since _init cannot fully initialize, it waits for time to pass in the main program. It seems that the time t() stops in _init, and the mouse position does not change. It seems that time progresses entirely within _draw(_update). This is to prevent unnecessary tap events from occurring because a touch is determined by moving the position of the mouse cursor, and the initial position of the mouse cannot be obtained correctly. There may be a way to avoid this using memory manipulation, etc. This decision statement is clearly a waste of processing. --]] if t() &lt; 0.2 then return end -- Processes when it is determined that a touch has occurred. if tch.tap then splatter(tch.x, tch.y) end end --[[ It's not used within the program, but is useful for making the mouse cursor visible again. --]] function rst() cls() window { cursor=1 } end --[[ Creates an ink splatter effect. This is just to make the examples a bit more interesting. Have fun! --]] function splatter(x, y) local col = flr(rnd(31)+1) local mdist = rnd(20)+10 for i=0,mdist do local ang = rnd(1) local dist = rnd(mdist) local rad = rnd(mdist-dist) local xx = dist * cos(ang) + x local yy = dist * sin(ang) + y circfill(xx, yy, rad, col) end end --[[ Touch Structure This determines if a tap has been performed by touch operation when the mouse cursor is moved. --]] touch = {} touch.new = function() local x, y, _ = mouse() local obj = {} obj.x = 0 obj.y = 0 obj.tap = false obj.check = function(self) local x, y, _ = mouse() if self.tap == false and (x != self.x or y != self.y) then self.x = x self.y = y self.tap = true else self.tap = false end end return obj end </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> https://www.lexaloffle.com/bbs/?tid=144912 https://www.lexaloffle.com/bbs/?tid=144912 Fri, 25 Oct 2024 07:25:55 UTC Japanese 'MISAKI' font <p> <table><tr><td> <a href="/bbs/?pid=154589#p"> <img src="/bbs/thumbs/pico64_misakitest-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=154589#p"> misakitest</a><br><br> by <a href="/bbs/?uid=38029"> sugarflower</a> <br><br><br> <a href="/bbs/?pid=154589#p"> [Click to Play]</a> </td></tr></table> </p> <p>I've put together a way to use the MISAKI font (<a href="https://littlelimit.net/misaki.htm">https://littlelimit.net/misaki.htm</a>) to display Japanese on picotoron.</p> <p>Currently, only simple functions have been implemented, so there is still a lot to do before it can be used in practical use.</p> <p>I can't keep up with the work by myself, so I decided to release it here so that it can be used partially. Basically, I think it's fine if you use it freely. (I would appreciate feedback as well.)</p> <p>*You will need to know the kuten code to display it, but there is a lot of useful information on the Internet about this.</p> https://www.lexaloffle.com/bbs/?tid=144337 https://www.lexaloffle.com/bbs/?tid=144337 Sat, 21 Sep 2024 17:18:35 UTC chipeight <p>A virtual computer that runs on a fantasy console. I find this very interesting, so I've made it work for now.</p> <p> <table><tr><td> <a href="/bbs/?pid=153933#p"> <img src="/bbs/thumbs/pico64_chipeight-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=153933#p"> chipeight</a><br><br> by <a href="/bbs/?uid=38029"> sugarflower</a> <br><br><br> <a href="/bbs/?pid=153933#p"> [Click to Play]</a> </td></tr></table> </p> <p>Key assignments</p> <p>[1][2][3][4]<br /> [q][w][e][r]<br /> [a][s][d][f]<br /> [z][x][c][v]</p> <p>These can also be changed in key.lua if necessary.</p> <h2>0.0.1b</h2> <ul> <li>Minor bug fixes</li> <li>Modified to load ROMs as external pod files by drag and drop (Thank you pancelor!)</li> <li>Change display from full screen to windowed (to drop the ROM)</li> </ul> <h3>How to create a &quot;rom&quot; pod.</h3> <p><code>store(filepath, userdata(&quot;u8&quot;, bytelength, romdata))</code></p> <p><em>Specifically, it looks like this.</em></p> <p><code>store(&quot;/logo.pod&quot;, userdata(&quot;u8&quot;, 132, &quot;00e0a22a600c6108d01f7009a239d01fa2487008d01f7004a257d01f7008a266d01f7008a275d01f1228ff00ff003c003c003c003c00ff00ffff00ff0038003f003f003800ff00ff8000e000e00080008000e000e00080f800fc003e003f003b003900f800f8030007000f00bf00fb00f300e30043e505e2008507810180028007e106e7&quot;))</code></p> https://www.lexaloffle.com/bbs/?tid=144113 https://www.lexaloffle.com/bbs/?tid=144113 Mon, 09 Sep 2024 11:54:49 UTC Handling floating point binary numbers (experimental) <p> <table><tr><td> <a href="/bbs/?pid=153082#p"> <img src="/bbs/thumbs/pico64_f32b_test-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=153082#p"> f32b_test</a><br><br> by <a href="/bbs/?uid=38029"> sugarflower</a> <br><br><br> <a href="/bbs/?pid=153082#p"> [Click to Play]</a> </td></tr></table> </p> <ul> <li>Operation cannot be confirmed online.</li> </ul> <p>If you want to store floating point values ​​in user data (or POD storage), currently using floats in user data or memmaps will not give good results.</p> <p>My guess is that using floats in user data will be treated as standard in the future.</p> <p>This program, f32b.lua, is included, and main.lua contains a simple usage example.<br /> It is very experimental, but may be useful in some way.<br /> It may also be possible to improve it and achieve more.<br /> I don't think f32b.lua is fully optimized, but someone could perfect it.</p> <p>The usage is as follows (contents of main.lua):</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>include &quot;f32b.lua&quot; --[[ *** If you store it in user data. f32b.lua uses &quot;u8&quot; for user data. Each floating point value uses 4 bytes. In other words, if you want to save two values, create it as userdata(&quot;u8&quot;, 8). --]] mydata = userdata(&quot;u8&quot;, 8) -- To set a value for user data, do this: set_value(mydata, 0, -123.45) set_value(mydata, 1, 100.0) -- To extract it from the user data: print(get_value(mydata, 0)) print(get_value(mydata, 1)) --[[ 32b.lua is not for user data. Use this if you want to create pure floating point binaries. --]] v = pack(d2b(3.1415)) binary = string.format(&quot;%08x&quot;, v) print(binary) -- To revert back to the original value: print(b2d(unpack(v))) -- An unpacked value is a 4-byte table. data = d2b(123.45) for i=1,4 do print(data[i]) 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>Feel free to modify it to make it easier for you. :)</p> https://www.lexaloffle.com/bbs/?tid=143807 https://www.lexaloffle.com/bbs/?tid=143807 Thu, 22 Aug 2024 11:33:24 UTC Choose a map by its name and use it. <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 sel_layer(name) local m = fetch(&quot;map/0.map&quot;) local map_no = 0 for i in pairs(m) do if m[i].name == name then map_no = i break end end if map_no != 0 then memmap(m[map_no].bmp, 0x100000) else error(&quot;There is no map data named '&quot; .. name .. &quot;'&quot;) end 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>I have saved the aforementioned code as a file named 'layer.lua'.<br /> By utilizing this code, we can load specific map layers based on their assigned names.</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/38029/スクリーンショット 2024-08-16 141155.png" alt="" /> <p>To illustrate, imagine a map with a layer configuration as depicted in the following image.</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>include &quot;layer.lua&quot; function _draw() sel_layer(&quot;sky&quot;) map(0, 0) sel_layer(&quot;house&quot;) map(0, 0) sel_layer(&quot;tree&quot;) map(0, 0) end</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> https://www.lexaloffle.com/bbs/?tid=143693 https://www.lexaloffle.com/bbs/?tid=143693 Fri, 16 Aug 2024 04:54:18 UTC maze wallpaper <p> <table><tr><td> <a href="/bbs/?pid=152282#p"> <img src="/bbs/thumbs/pico64_zamuwawaje-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=152282#p"> zamuwawaje</a><br><br> by <a href="/bbs/?uid=38029"> sugarflower</a> <br><br><br> <a href="/bbs/?pid=152282#p"> [Click to Play]</a> </td></tr></table> </p> <p>There were problems with /ram/shared/theme.pod not being able to be loaded on the web, but by providing default values ​​it now works on the web.<br /> No changes to functionality</p> https://www.lexaloffle.com/bbs/?tid=143520 https://www.lexaloffle.com/bbs/?tid=143520 Tue, 06 Aug 2024 18:59:39 UTC trackercmd <p> <table><tr><td> <a href="/bbs/?pid=151627#p"> <img src="/bbs/thumbs/pico64_trackercmd-2.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=151627#p"> trackercmd</a><br><br> by <a href="/bbs/?uid=38029"> sugarflower</a> <br><br><br> <a href="/bbs/?pid=151627#p"> [Click to Play]</a> </td></tr></table> </p> <p>Since I have a hard time remembering tracker commands, I made this.<br /> We can change where things show up by tweaking main.lua.</p> <p><em>It seems that the web player can't play the tool tray.</em></p> <p>changes</p> <ul> <li>Fixed a typo.</li> <li>Right-click to exit.</li> </ul> https://www.lexaloffle.com/bbs/?tid=143261 https://www.lexaloffle.com/bbs/?tid=143261 Mon, 22 Jul 2024 11:30:25 UTC bytebeat <p> <table><tr><td> <a href="/bbs/?pid=150502#p"> <img src="/bbs/thumbs/pico8_zamarazida-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=150502#p"> zamarazida</a><br><br> by <a href="/bbs/?uid=38029"> sugarflower</a> <br><br><br> <a href="/bbs/?pid=150502#p"> [Click to Play]</a> </td></tr></table> <br /> This is Bytebeat that uses PCM function.</p> https://www.lexaloffle.com/bbs/?tid=142874 https://www.lexaloffle.com/bbs/?tid=142874 Thu, 27 Jun 2024 15:51:23 UTC punkt <p> <table><tr><td> <a href="/bbs/?pid=150453#p"> <img src="/bbs/thumbs/pico64_punkt-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=150453#p"> punkt</a><br><br> by <a href="/bbs/?uid=38029"> sugarflower</a> <br><br><br> <a href="/bbs/?pid=150453#p"> [Click to Play]</a> </td></tr></table> </p> <p>I ported my favorite game for Gamebuino.<br /> It's simple but very nice.</p> <p>The original punkt is <a href="https://github.com/aoneill01/gamebuino-punkt">here</a>.</p> <p><em>Note: This game is not a complete port of the original punkt.</em></p> https://www.lexaloffle.com/bbs/?tid=142864 https://www.lexaloffle.com/bbs/?tid=142864 Wed, 26 Jun 2024 15:18:48 UTC pico tone <p>Although it is still a prototype, I have created a toy that dynamically generates sounds using PCM functions :) I am thinking about how to make this even more interesting.</p> <p> <table><tr><td> <a href="/bbs/?pid=149387#p"> <img src="/bbs/thumbs/pico8_zazaharudo-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=149387#p"> zazaharudo</a><br><br> by <a href="/bbs/?uid=38029"> sugarflower</a> <br><br><br> <a href="/bbs/?pid=149387#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=142566 https://www.lexaloffle.com/bbs/?tid=142566 Mon, 03 Jun 2024 16:35:48 UTC functionlist <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/38029/5_functions.p64.png" alt="" /> <p>This was created to create an instruction list.<br /> It will be useful to use spreadsheet software (such as Excel) to understand the whole.</p> <p>It is intended to be used on a console.<br /> Also, the execution results are copied to the clipboard.</p> https://www.lexaloffle.com/bbs/?tid=142256 https://www.lexaloffle.com/bbs/?tid=142256 Mon, 13 May 2024 17:08:45 UTC characterlist <p> <table><tr><td> <a href="/bbs/?pid=148362#p"> <img src="/bbs/thumbs/pico64_characterlist_2-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=148362#p"> characterlist_2</a><br><br> by <a href="/bbs/?uid=38029"> sugarflower</a> <br><br><br> <a href="/bbs/?pid=148362#p"> [Click to Play]</a> </td></tr></table> </p> <p>In the future I'm thinking of running this in a tool tray.<br /> This is not easy to use in terms of area unless you consider the layout.</p> <p>0.0.2: Simple fix to reduce unnecessary code.<br /> 0.0.3: Selected characters are now copied to the clipboard for reuse.</p> https://www.lexaloffle.com/bbs/?tid=142255 https://www.lexaloffle.com/bbs/?tid=142255 Mon, 13 May 2024 17:04:22 UTC milkiecolour wallpaper <p> <table><tr><td> <a href="/bbs/?pid=148265#p"> <img src="/bbs/thumbs/pico64_milkiecolour-3.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=148265#p"> milkiecolour wallpaper</a><br><br> by <a href="/bbs/?uid=38029"> sugarflower</a> <br><br><br> <a href="/bbs/?pid=148265#p"> [Click to Play]</a> </td></tr></table> </p> <p>I tried to make it :D</p> <p>0.1.1 Fixed to prevent unnecessary drawing.</p> https://www.lexaloffle.com/bbs/?tid=142208 https://www.lexaloffle.com/bbs/?tid=142208 Sat, 11 May 2024 09:16:11 UTC