04 June 2011, 11:53 | #1 |
Registered User
Join Date: Nov 2010
Location: .
Posts: 385
|
[REQ:ASM] Loading a static image and its palette
I'm after some info about loading a static image into my asm code.
I tried reading the various threads on EAB, but there's something I must be missing because I can't obtain the same image quality I see from PicCon. My (emulated) Amiga is set to standard PAL lowres. This is the procedure I'm following: 1) Grab any JPG from the interwebs 2) Open it with ImageStudio, set it to color-mapped with 32 colors, then save palette, then save as IFF 3) Open the IFF with PicCon, the image looks good (see piccon.png), save as RAW, 320x256, 5 bitplanes 4) Include in the code with its palette.... crap result (see code.png). Including the palette whould save me the hassle to manually edit all the color registers, right? Do I have to edit the palette before exporting it? Also attached the src code for those interested. I'm pretty sure I'm setting the copper correctly: zero all sprites, set the window, load the image into bitplanes ... I think I'm doing the whole thing like I should. Thanks. EDIT: Teddybear programming: I just discovered a mistake, I was loading 3 bitplanes only, not 5. However the final result still isn't what I want (see code2.jpg). Source code fixed. sorry. Last edited by jman; 04 June 2011 at 13:27. |
04 June 2011, 12:59 | #2 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
|
Looks like your palette is wrong, code seems to be OK. My guess is that you exported a standard raw palette (i.e. not for the copperlist) which won't work for obvious reasons. Choose "4 bits" and tick the "Copperlist" checkbox in PicCon's "Palette" settings.
|
04 June 2011, 13:55 | #3 | |
Registered User
Join Date: Nov 2010
Location: .
Posts: 385
|
Quote:
Thank you very much, that did the trick. I was about to ask you why the suggested changes but then I've found proper answer in the PicCon guide (rtfm ftw). One last question: the palette in 'copperlist' format is still a binary file. For the sake of learning, how can I check what's in that file? I'd like to replicate that palette setting $dff180-$dff1eb registers. thanks again. Last edited by jman; 04 June 2011 at 16:41. |
|
04 June 2011, 14:08 | #4 | |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
|
Quote:
Or, if you only want to check the data, you could use the "h.w" (view hex, word sized) command. If you don't use AsmOne/Pro you will have to change PicCon's settings to export data as ASM source (Project->Save data as...-> Asm Source). You're welcome. |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[REQ:ASM] Reading a keystroke | jman | Coders. Tutorials | 34 | 17 August 2023 12:36 |
[REQ:ASM] Sprite collisions basics | jman | Coders. Tutorials | 5 | 03 September 2011 00:07 |
[REQ:ASM] Assembling and running | jman | Coders. Tutorials | 9 | 07 May 2011 18:39 |
REQ:ASM getting elapsed time on A1200 | jman | Coders. Tutorials | 18 | 11 January 2011 22:24 |
REQ:ASM How to use buffers | jman | Coders. Tutorials | 7 | 01 December 2010 01:41 |
|
|