Page 1 of 1
question about Pet Draw
Posted: Fri Apr 12, 2024 6:36 pm
by HosayNotJoseph
So i created a nice layout for my game on the x16, called kernel panik, using PetDrawx 2. is there any way that i can export it in a way i can use for my game?
attatched is a picture of the game layout.

Re: question about Pet Draw
Posted: Fri Apr 12, 2024 7:17 pm
by m00dawg
Yep! Though at present I don't have a way to export parts of the screen. The save file is basically just the raw VRAM dump of the visible screen you see in Petdraw.
I have a routine in Dreamtracker which loads the screen buffer off disk and directly into VRAM which you can probably repurpose:
https://gitlab.com/m00dawg/dream-tracke ... o_vram.asm
An example of how to call that routine:
https://gitlab.com/m00dawg/dream-tracke ... n.asm#L146
The use of MACPTR makes the load crazy fast, and the above is probably a great solution for a loading/splash screen where you're using most or all of the screen for art. It's fast but not instant and if you only need to load part of the screen, it'd be more efficient to figure out just those bytes and export those, though I don't have a process for that in PDX2 yet (among other nice to haves like block copy/paste/shift functions).
Re: question about Pet Draw
Posted: Fri Apr 12, 2024 7:21 pm
by ahenry3068
m00dawg wrote: ↑Fri Apr 12, 2024 7:17 pm
Yep! Though at present I don't have a way to export parts of the screen. The save file is basically just the raw VRAM dump of the visible screen you see in Petdraw.
I have a routine in Dreamtracker which loads the screen buffer off disk and directly into VRAM which you can probably repurpose:
https://gitlab.com/m00dawg/dream-tracke ... o_vram.asm
An example of how to call that routine:
https://gitlab.com/m00dawg/dream-tracke ... n.asm#L146
The use of MACPTR makes the load crazy fast, and the above is probably a great solution for a loading/splash screen where you're using most or all of the screen for art. It's fast but not instant and if you only need to load part of the screen, it'd be more efficient to figure out just those bytes and export those, though I don't have a process for that in PDX2 yet (among other nice to haves like block copy/paste/shift functions).
If you are using the ENTIRE Screen. Then a Load pointed at the correct VRAM address is about the fastest way.
Re: question about Pet Draw
Posted: Fri Apr 12, 2024 7:24 pm
by m00dawg
Indeed, that's exactly what the linked code does.
Re: question about Pet Draw
Posted: Fri Apr 12, 2024 7:25 pm
by HosayNotJoseph
Yep! Though at present I don't have a way to export parts of the screen. The save file is basically just the raw VRAM dump of the visible screen you see in Petdraw.
I have a routine in Dreamtracker which loads the screen buffer off disk and directly into VRAM which you can probably repurpose:
https://gitlab.com/m00dawg/dream-tracke ... o_vram.asm
An example of how to call that routine:
https://gitlab.com/m00dawg/dream-tracke ... n.asm#L146
The use of MACPTR makes the load crazy fast, and the above is probably a great solution for a loading/splash screen where you're using most or all of the screen for art. It's fast but not instant and if you only need to load part of the screen, it'd be more efficient to figure out just those bytes and export those, though I don't have a process for that in PDX2 yet (among other nice to haves like block copy/paste/shift functions).
basically what i was going to do is use what i drew as elements that dont change at all, and use sprites for everything else
Re: question about Pet Draw
Posted: Fri Apr 12, 2024 7:27 pm
by ahenry3068
m00dawg wrote: ↑Fri Apr 12, 2024 7:24 pm
Indeed, that's exactly what the linked code does.
I've actually gotten in the habit of having any Program I write that does a pretty complicated screen to only draw it once then save it to disk so It can just be BVLOADED afterwards. I've done that on Hangman, My Palette Editor and Also now my Audio Book Program.
Re: question about Pet Draw
Posted: Fri Apr 12, 2024 7:40 pm
by m00dawg
Yep, screens loaded faster than I could blink generally and that's before the even faster SDcard read mode in R47.