English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 20 October 2017, 11:50   #1
Steril707
OCS rocks!

 
Join Date: Sep 2016
Location: Munich/Germany
Posts: 233
Loading PCHG IFF files

Can somebody give me a pointer (pun intended!) to how implement loading PCHG IFF files with 68K asm on the Amiga?

I really like what tool.anides.de generates for me, and would love to use that in my games but have no idea about that format...

Thanks,
Michael
Steril707 is offline  
AdSense AdSense  
Old 20 October 2017, 16:57   #2
pandy71
Registered User
 
Join Date: Jun 2010
Location: PL
Posts: 1,546
Perhaps http://aminet.net/package/dev/misc/PCHGLib14 ?
pandy71 is offline  
Old 20 October 2017, 17:14   #3
Photon
Moderator
Photon's Avatar
 
Join Date: Nov 2004
Location: Hult / Sweden
Posts: 4,452
There is a ready tool for conversion to copper lists + source for loading and displaying that you can use in your own code if you want, in the Frazetta slideshow
Photon is offline  
Old 21 October 2017, 12:07   #4
Steril707
OCS rocks!

 
Join Date: Sep 2016
Location: Munich/Germany
Posts: 233
Ah okay..
Cool, guys. Will have a look into that...

It's great, that you can get help so fast here, almost always...

EAB is really the best place for Amiga coders...


Add:
Okay, I have some questions...
I don't quite get where the code for reading in the PCHG IFF is in that...
I guess it's at the start of PCHG-source.S, but I am really not sure about that.

Last edited by Steril707; 21 October 2017 at 13:57.
Steril707 is offline  
Old 22 October 2017, 01:13   #5
Photon
Moderator
Photon's Avatar
 
Join Date: Nov 2004
Location: Hult / Sweden
Posts: 4,452
Well, it has an example that loads a picture and displays it, just assemble and run and take it from there, replace the picture, run, copy-paste the example code and insert into your program, etc.
Photon is offline  
Old 22 October 2017, 21:49   #6
Steril707
OCS rocks!

 
Join Date: Sep 2016
Location: Munich/Germany
Posts: 233
Sorry if I sound stupid, but once again..

I guess you mean PCHG-source.S?

Why I am asking: At the part where probably the pic is supposed to be displayed there is only a comment reading:

*--- show Buff0 with copdst here! ---*
*--- show Buff0 with copdst here! ---*
.dontshow:
rts

and then going back to the CLI.

So, not that easy for me how to go on after that at the moment...
Steril707 is offline  
Old 23 October 2017, 11:26   #7
Photon
Moderator
Photon's Avatar
 
Join Date: Nov 2004
Location: Hult / Sweden
Posts: 4,452
It's quite plug and play, there shouldn't be much to say about the source if you've incorporated others' into your project before.

The example code converts a PCHG so you can display it.

Often you would want control over your buffers, so those comments say what to do to display it: between those lines, you can put code or a bsr to show the screen directly, or you can just trigger the "dontshow" and display in when it's time to display it.

So the comment means, point bitplane pointers to Buff0 and display the destination Copper list (copdst) with all the palette changes in it and you have your picture showing.

And if you don't need to load the pictures after your program has started, you can convert them separately with the commandline utility provided, and INCBIN them.
Photon is offline  
Old 23 October 2017, 13:46   #8
Steril707
OCS rocks!

 
Join Date: Sep 2016
Location: Munich/Germany
Posts: 233
Quote:
Originally Posted by Photon View Post
The example code converts a PCHG so you can display it.

Often you would want control over your buffers, so those comments say what to do to display it: between those lines, you can put code or a bsr to show the screen directly, or you can just trigger the "dontshow" and display in when it's time to display it.
I understood that part of the code... I was just wondering where the part is that displays the actual pic.

Quote:
Originally Posted by Photon View Post
So the comment means, point bitplane pointers to Buff0 and display the destination Copper list (copdst) with all the palette changes in it and you have your picture showing.
Well, i tried that yesterday, but had no success... Just got a "blue screen" (not the windows one ).

Maybe I need to try harder then... Seems I did some wrong thinking setting up stuff.

So it's setting the bitplane pointers and setting cop1lc to copdst and then I am done?
Will try again and report..

Thanks for your support,
Photon
Steril707 is offline  
Old 23 October 2017, 20:45   #9
Trachu
Registered User
 
Join Date: Dec 2015
Location: Poland
Posts: 172
tool.anides.de DOES NOT generate PCHG IFF file just IFF with taken from Atari ST pallette chunk
Trachu is offline  
Old 23 October 2017, 22:38   #10
AnimaInCorpore
Registered User
 
Join Date: Nov 2012
Location: Willich/Germany
Posts: 149
Trachu is correct. PCHG is actually a misleading term for the format. Loading PCHG images is supported, though, but saving will follow soon.
AnimaInCorpore is offline  
Old 24 October 2017, 10:43   #11
Steril707
OCS rocks!

 
Join Date: Sep 2016
Location: Munich/Germany
Posts: 233
Quote:
Originally Posted by AnimaInCorpore View Post
Trachu is correct. PCHG is actually a misleading term for the format. Loading PCHG images is supported, though, but saving will follow soon.
Ah good to know.
And nice that it will work soon.

I got some plans for coding something using PCHG images for my next project after Inviyya, and this will come in handy...
Steril707 is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sonic IFF Files on Backbone? DerekAutista123 support.WinUAE 3 07 March 2016 00:44
Ripping DKK IFF-SMUS files BastyCDGS request.Modules 2 24 November 2015 00:58
Listing files, loading files and allocating all available chip ram. h0ffman Coders. System 16 04 April 2013 22:24
Aren't DPaintIV files IFF? Morbane support.Amiga Forever 19 27 November 2011 13:29
Create an ADF slideshow with IFF files. Vollldo request.Demos 13 21 September 2011 20:29

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 17:54.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.16867 seconds with 14 queries