Replies: 8 comments
-
this is semi-related to #1698 Specifically, it would be a different way to solve the seeding issue I am trying to solve. @joshgoebel gave me some advice there to look into hacking the pmem, this was the best I was able to come up with. |
Beta Was this translation helpful? Give feedback.
-
Use diff file names just to confirm it's using the file you think it is. |
Beta Was this translation helpful? Give feedback.
-
my original implementation had two filenames, with the output stream saving as cart.tic; unfortunately the output just doesn't save anything... not to mention I’m not sure this implementation would even work when served over the web? On Sat, Dec 17, 2022 at 3:35 PM, Josh Goebel ***@***.***> wrote:
Use diff file names just to confirm it's using the file you think it is.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Also, this is not really what I would expect to see. You're not opening a new file for output anywhere and you're not writing all the sections to it unless save as is supposed to be doing that which is very weird naming. I also don't see you recalculating the new size of the chunk after you've made changes to it? |
Beta Was this translation helpful? Give feedback.
-
Yes, I think it's really fair to say I have no idea what I’m doing, I’m completely out of my element so far. On Sat, Dec 17, 2022 at 3:40 PM, Josh Goebel ***@***.***> wrote:
Also, this is a really what I would expect to see. You're not opening a new file for output anywhere and you're not writing all the sections to it unless save as is supposed to be doing that which is very weird naming.
I also don't see you recalculating the new size of the chunk after you've made changes to it?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I forgot there isn't a PMEM chunk, but it'd be easier to use any of the other binary chunks and just modify a few bytes than all this code to try and alter strings and put them back together again. Just give up a sprite, or even add a new chunk if you aren't using all 8 banks of any given chunk. |
Beta Was this translation helpful? Give feedback.
-
Yeah since I only need to pass in a single int I can't imagine it taking too much space. I’m not even using sprites so I'd love to try that. Could you possibly give me a little guidance in that direction? On Sat, Dec 17, 2022 at 3:45 PM, Josh Goebel ***@***.***> wrote:
I forgot there isn't a PMEM chunk, but it'd be easier to use any of the other binary chunks and just modify a few bytes than all this code to try and alter strings and put them back together again. Just give up a sprite, or even add a new chunk if you aren't using all 8 banks of any given chunk.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
You have the right idea, load it, modify it, save it, feed the modified cart to TIC-80, but I don't know the exact code/APIs for all of that off the top of my head... sorry. |
Beta Was this translation helpful? Give feedback.
-
Hello!
I am currently struggling with something. I have a usecase where I produce a generator as a tic-80 cartridge, export it via the web export, and now wish to modify the seed for the prng from the browser.
I've explored a few different options, but what I've been trying lately is to read in the cart.tic file before it's loaded, search for the
seed=[some number]
line, and replace it, then saving cart.ticIt doesn't work, and I was wondering if anyone could help me figure out why? This is my javascript code "seed_fuckery.js", which I am loading prior to loading the emulator:
Beta Was this translation helpful? Give feedback.
All reactions