English Amiga Board


Go Back   English Amiga Board > abime.net - Hosted Projects > project.Sprites

 
 
Thread Tools
Old 08 March 2020, 22:11   #1
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 3,689
Ripping Jim Power

Not sure it has been done yet

Wasn't easy as the main character is a combined sprite (32 pixels wide, 16 colors).

Click image for larger version

Name:	jim.png
Views:	44
Size:	45.2 KB
ID:	66405


here's the python script reading from a game data (uncompressed ATOM file from offset $8800 on the disk), using ripped 16-32 palette from WinUAE (thanks WinUAE) and writing a PNG


Code:
import PIL.Image

palette = [(0, 0, 255), (0, 64, 32), (176, 160, 192), (112, 96, 128), (64, 48, 80), (224, 144, 80),
(48, 128, 96), (112, 0, 0), (128, 192, 160), (240, 240, 240), (224, 224, 48), (176, 64, 16), (0, 0, 0), (240, 96, 240), (192, 192, 192), (240, 240, 240)]

sprite_width = 16
nb_x_sprite = 2
nb_x_frames = 72
height = 54
nb_y_frames = 4
output_filename = "jim.png"

with open("file_00008800_00056AD8.bin","rb") as f:
    contents = f.read()

img = PIL.Image.new('RGB', (sprite_width * nb_x_sprite * nb_x_frames,height))



for s in range(nb_x_sprite):
    start_skip = 216*2*s
    # number of horizontal full character frame
    for xf in range(nb_x_frames):
        xf_start = xf * nb_x_sprite * sprite_width
        # height, interleaved (2 lines make a line with 4 colors)
        for y in range(0,height*2,2):
            # sprites are combined in 2 halves of 16 pixels
            for x in range(s*sprite_width,(s+1)*sprite_width,8):
                for i in range(8):
                    value = 0
                    shift = (1<<(7-i))
                    for yoff_sprite in [0,1]:
                        for yoff_interleave in [0,1]:
                            offset = ((y+yoff_interleave + yoff_sprite*(height*2))*sprite_width + (x%16))//8 + (height*nb_y_frames*2)*(xf*2)

                            if (shift & contents[offset + start_skip]):
                                value |= 1<<(yoff_interleave+2*yoff_sprite)
                    img.putpixel((xf_start+x+i,y//2),palette[value])

img.save(output_filename)
There are other assets to rip (enemies, pictures...). Will try to rip them as well.
jotd is offline  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Jim Power CD32 jotd project.CD32 Conversion 28 13 February 2020 11:08
About the creators of Jim Power and many more... Shoonay Nostalgia & memories 6 24 March 2017 13:32
Jim Power, which is the best version s2325 Retrogaming General Discussion 63 24 February 2017 03:35
Jim Power slowdown Dr.Venom support.WinUAE 3 15 October 2016 16:32
Jim Power Unregistered support.Games 0 27 July 2002 15:03

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 22:40.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Page generated in 0.09432 seconds with 15 queries