Xeonic [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=65062 Basic himem principals (using 0x8000 and mem copy) <p>This is a basic example i wrote to give a friend some help learning basic use of memory</p> <div> <div style="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> --basic himem use for small games. --credit, 𝘭uenardi 𝘭uigi 𝘥e 𝘱olo aka 𝘭egion𝘬𝘪𝘯 --𝘮𝘢𝘬𝘦 𝘴𝘶𝘳𝘦 you are currently in the working folder for these carts. --this cart 'mem_1.p8' runs the code, --create a cart called mem_2.p8 contains 1 sprite we will load and put into himem. --this copies a entire sprite sheet --then we will draw the sprites both from this cart and mem2.p8 from himem. --dest = destination- --src = source- --len = length- --0x0000 is the start of the graphics memory --0x1000 is the end of the graphics memory --0x8000 is the start of himem (high memory) -- all of these are memory addresses -- backup current gfx sheet in mem_1.p8 from memory address 0 to 0x1000 and put it down in himem at 0x8000 This will fill himem from 0x8000 to 0x9000 with data from the sprite sheet already in the cart mem_1.p8 memcpy(0x8000, 0x0000, 0x1000) -- here we copied to x8000 and we copied from x0000 to x1000 meaning the length is 0x1000 -- meaning length + destination address = next open space = x9000 -- x1000 + x8000 = x9000 -- meaning here we copy or reload to the next available space = 0x9000 -- load data from a cart from the source address 0x000 to 0x1000 from mem_2.p8 -- just like mem cpy reload will copy to the specified addresse 0x9000 reload(0x9000, 0x0000, 0x1000,'mem_2.p8') -- now we have both sheets in memory -- sheet 1 is at 0x8000 -- and -- sheet 2 is at 0x9000 function _draw() cls(0) --load sprite sheet1 --copies memory from 0x8000 to 0x0000 and dont forget the lenght 0x1000 memcpy(0x0000, 0x8000, 0x1000) --this replaces everything from 0x000 to 0x1000 from 0x8000 -- now we draw everything we want from that sheet spr(1,32,64) in this case --load sprite sheet2 --copies memory from 0x9000 to 0x0000 and dont forget the lenght 0x1000 memcpy(0x0000, 0x9000, 0x1000) --this replaces everything from 0x000 to 0x1000 from 0x9000 -- now we draw everything we want from that sheet! spr(1,96,64) --done 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>--note that i used sprite index one on both sheets<br /> -- this does impact performance a bit but works for small games that just need a few more sprites handy</p> <p>see the discord link bellow for the zipped example<br /> <a href="https://cdn.discordapp.com/attachments/938158730246254643/997921832227328131/himem_-_basic_example_how_to_use.zip">https://cdn.discordapp.com/attachments/938158730246254643/997921832227328131/himem_-_basic_example_how_to_use.zip</a></p> https://www.lexaloffle.com/bbs/?tid=48529 https://www.lexaloffle.com/bbs/?tid=48529 Sat, 16 Jul 2022 17:31:03 UTC unfair <p>Unfair... un fucking fair.<br /> Dirty, bad moderation team that trolls people.<br /> Here's a fact what would jesus do?<br /> the opposite of your team.. they want a enemy they got one.</p> <p>Here's some advice for the kids reading this, run for your life you cant expect justice here run.<br /> these people would rather hold a grudge than take their own advice and move on.</p> <p>Fact no one minded ruining this for me as well.<br /> day 1 when i joined and said hey i think a esp32 port is possible that discord lost it's mind for nothing...</p> <p>I was asked by merwok... to reset &quot;him acting as a moderator for the 1st time&quot;<br /> And i reset out of my own free will.<br /> also every discord out there is 3 strikes not 2.<br /> also other discords don't get their panties flipped the moment someone has opinion or wants legitimate feedback.<br /> So don't tell me how innocent they are...</p> <p>and dont tell me to calm down.. they clearly need to calm down and come down from their iron tower and touch grass.</p> https://www.lexaloffle.com/bbs/?tid=48339 https://www.lexaloffle.com/bbs/?tid=48339 Tue, 28 Jun 2022 05:06:41 UTC Anyone got some advice on making EDM <p>I need some real advice thats not &quot;RNG click on everything till it sounds good&quot;<br /> That seems to be a real pain in the butt the only advice two music makers here have shared with me.</p> <p><a href="https://luchak.github.io/rp8/#running-rp-8">https://luchak.github.io/rp8/#running-rp-8</a><br /> When i can easily make music with something like this blind folded but cant use it for music in my games </p> <p>it's not than you cant make good music<br /> the problem is 1 in 200 can<br /> where as everyone on this planet CAN import a wave file IF pico-8 let you</p> https://www.lexaloffle.com/bbs/?tid=48147 https://www.lexaloffle.com/bbs/?tid=48147 Mon, 13 Jun 2022 06:22:48 UTC looking for a command, <p>someone shared a command for the pico-8 for holding the current palette so you can use the built editor if need be?<br /> or was i mistaken? </p> https://www.lexaloffle.com/bbs/?tid=48112 https://www.lexaloffle.com/bbs/?tid=48112 Fri, 10 Jun 2022 20:22:21 UTC Feature suggestion: Serial access on pc. <p>The reason i am asking for this is several.</p> <p>Most dev boards allow serial communication, the mighty serial port has stood the test of time. </p> <p>I tend to mess about with loads of electronics and having access to a serial port from within pico-8 would be prenominal for robotics and making multiplayer games over serial work even if it only at a low emulated transfer rate.</p> <p>I have linux machines that run pico-8 along with the logic for other gadgets but it makes me dependent or a raspberry pi and that does not have enough kick for my needs to gets stuff done so.<br /> I run atom or zen chipsets with a modded build of windows as I tend to prefer the environment over linux, however this causes me to have to use some messy cabling and running 2 pieces of hardware to kill one rabbit and the needing to use hax for this pi to pass thru the laptop. it's not pretty. </p> <p>Open CV alone tilts a pi and i cant afford chip for acceleration so i run my code for CV on a laptop chipset's gpu, something the pi can't do at a good speed without dying.</p> <p>Honestly would understand fully if the developer feels that people will be breaking pico-8 if they could locally access com ports on pc's, it honestly should not be too hard to add.</p> <p>Just allow a user to append a object to sync on the other side and then the host sends the updated object &quot;table&quot; across keeping it simple enough to use for most users.</p> <p>Mostly be planning 2 case uses for this, controlling electronics without a raspberry pi and serial local over com gameplay.</p> <p>There is a simple design for a usb&gt;com to com&gt;usb host cable most can make cheaply at home for this.<br /> And am will to take on any responsibilities assisting users with debugging.</p> <p>I hope that Lexaoffle will consider my idea if not today some time somewhere in the future.<br /> Thank you for reading.</p> https://www.lexaloffle.com/bbs/?tid=48088 https://www.lexaloffle.com/bbs/?tid=48088 Thu, 09 Jun 2022 08:23:14 UTC