question about Pet Draw

Get technical support from the community & developers with specific X16 programs if you can't find the solution elsewhere
(for general non-support related chat about programs please comment directly under the program in the software library)
Post Reply
HosayNotJoseph
Posts: 2
Joined: Fri Apr 12, 2024 6:27 pm

Hardware question about Pet Draw

Post 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.
Image
m00dawg
Posts: 346
Joined: Wed Jul 08, 2020 12:41 am
Contact:

Re: question about Pet Draw

Post 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).
Author of Dreamtracker (https://www.dreamtracker.org/)
Check Out My Band: https://music.victimcache.com/
User avatar
ahenry3068
Posts: 1144
Joined: Tue Apr 04, 2023 9:57 pm

Re: question about Pet Draw

Post 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.
m00dawg
Posts: 346
Joined: Wed Jul 08, 2020 12:41 am
Contact:

Re: question about Pet Draw

Post by m00dawg »

Indeed, that's exactly what the linked code does.
Author of Dreamtracker (https://www.dreamtracker.org/)
Check Out My Band: https://music.victimcache.com/
HosayNotJoseph
Posts: 2
Joined: Fri Apr 12, 2024 6:27 pm

Re: question about Pet Draw

Post 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
User avatar
ahenry3068
Posts: 1144
Joined: Tue Apr 04, 2023 9:57 pm

Re: question about Pet Draw

Post 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.
m00dawg
Posts: 346
Joined: Wed Jul 08, 2020 12:41 am
Contact:

Re: question about Pet Draw

Post by m00dawg »

Yep, screens loaded faster than I could blink generally and that's before the even faster SDcard read mode in R47.
Author of Dreamtracker (https://www.dreamtracker.org/)
Check Out My Band: https://music.victimcache.com/
Post Reply