Saving to PI2 image code example ?

All 680x0 related coding posts in this section please.

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

User avatar
exxos
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England
Contact:

Saving to PI2 image code example ?

Postby exxos » Fri Jan 15, 2016 6:38 pm

Does anyone have a simple ASM routine to save a PI2 image from the current screen to a file ?
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator

User avatar
troed
Atari God
Atari God
Posts: 1447
Joined: Mon Apr 30, 2012 6:20 pm
Location: Sweden

Re: Saving to PI2 image code example ?

Postby troed » Fri Jan 15, 2016 6:44 pm

exxos wrote:Does anyone have a simple ASM routine to save a PI2 image from the current screen to a file ?


word: 0x1 (means medium res)
16*word: palette (yes, 16, even though only 4 are used for medium res)
32kb screen memory

Done.

User avatar
exxos
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England
Contact:

Re: Saving to PI2 image code example ?

Postby exxos » Fri Jan 15, 2016 6:48 pm

troed wrote:
exxos wrote:Does anyone have a simple ASM routine to save a PI2 image from the current screen to a file ?


word: 0x1 (means medium res)
16*word: palette (yes, 16, even though only 4 are used for medium res)
32kb screen memory

Done.


So does the screen palette info exactly match the PI2 format then ? I didn't think it was exactly the same. I don't know anything about the forum, but assumed there would have been something more in the PI2 format somehow.

i remember I tried to write some ASM code many years ago, I could load a PI1 file, but couldn't ever figure out how to get the colours to work properly :roll:
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator

User avatar
spiny
Disk Imager Supreme
Disk Imager Supreme
Posts: 2624
Joined: Mon Aug 11, 2003 11:53 pm
Location: just outside bristol
Contact:

Re: Saving to PI2 image code example ?

Postby spiny » Fri Jan 15, 2016 7:11 pm

basically, yes :) what troed said - works for all resolutions with Degas.

displaying one is the same:
movem.l picture+2,d0-d7 ; put picture palette in d0-d7
movem.l d0-d7,$FFFF8240.W ; move palette from d0-d7 to actualhardware register where pal lives

User avatar
Cyprian
10 GOTO 10
10 GOTO 10
Posts: 1718
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: Saving to PI2 image code example ?

Postby Cyprian » Fri Jan 15, 2016 7:19 pm

Exxos attached you can find my simple example in ASM
You do not have the required permissions to view the files attached to this post.
Lynx II / Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Steem SSE / Aranym / Saint
http://260ste.appspot.com/

User avatar
exxos
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England
Contact:

Re: Saving to PI2 image code example ?

Postby exxos » Fri Jan 15, 2016 7:30 pm

Cyprian wrote:Exxos attached you can find my simple example in ASM



Thanks, Will have a fiddle! :cheers:
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator

User avatar
Cyprian
10 GOTO 10
10 GOTO 10
Posts: 1718
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: Saving to PI2 image code example ?

Postby Cyprian » Fri Jan 15, 2016 11:27 pm

:)
Lynx II / Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Steem SSE / Aranym / Saint
http://260ste.appspot.com/

User avatar
bod/STAX
Atari Super Hero
Atari Super Hero
Posts: 508
Joined: Wed Nov 24, 2004 8:13 pm
Location: Halesowen, West Midlands, England

Re: Saving to PI2 image code example ?

Postby bod/STAX » Sun Feb 07, 2016 1:59 pm

pi2 is the same as pi1 except for the resolution word at the beginning (1 instead of 0)
So let it be written, So let it be done. I'm sent here by the chosen one.


Social Media

     

Return to “680x0”

Who is online

Users browsing this forum: No registered users and 4 guests