+atari2600land Posted April 30, 2021 Share Posted April 30, 2021 This is my image. This is my code in the rapinit.s file: ; Text/Particle Layer dc.l 1 ; (REPEAT COUNTER) ; Create this many objects of this type (or 1 for a single object) dc.l is_active ; sprite_active ; sprite active flag dc.w 64,0 ; sprite_x ; 16.16 x value to position at dc.w 16,0 ; sprite_y ; 16.16 y value to position at dc.w 0,0 ; sprite_xadd ; 16.16 x addition for sprite movement dc.w 0,0 ; sprite_yadd ; 16.16 y addition for sprite movement dc.l 256 ; sprite_width ; width of sprite (in pixels) dc.l 256 ; sprite_height ; height of sprite (in pixels) dc.l is_normal ; sprite_flip ; flag for mirroring data left<>right dc.l 0 ; sprite_coffx ; x offset from center for collision box center dc.l 0 ; sprite_coffy ; y offset from center for collision box center dc.l 0 ; sprite_hbox ; width of collision box dc.l 0 ; sprite_vbox ; height of collision box dc.l TITLESCREEN ; sprite_gfxbase ; start of bitmap data dc.l 8 ; (BIT DEPTH) ; bitmap depth (1/2/4/8/16/24) dc.l is_RGB ; (CRY/RGB) ; bitmap GFX type dc.l is_trans ; (TRANSPARENCY) ; bitmap TRANS flag dc.l 256*256*2 ; sprite_framesz ; size per frame in bytes of sprite data dc.l 256*2 ; sprite_bytewid ; width in bytes of one line of sprite data dc.l 0 ; sprite_animspd ; frame delay between animation changes dc.l 0 ; sprite_maxframe ; number of frames in animation chain dc.l ani_rept ; sprite_animloop ; repeat or play once dc.l edge_wrap ; sprite_wrap ; wrap on screen exit, or remove dc.l spr_inf ; sprite_timer ; frames sprite is active for (or spr_inf) dc.l spr_linear ; sprite_track ; use 16.16 xadd/yadd or point to 16.16 x/y table dc.l 0 ; sprite_tracktop ; pointer to loop point in track table (if used) dc.l spr_unscale ; sprite_scaled ; flag for scaleable object dc.l %00100000 ; sprite_scale_x ; x scale factor (if scaled) dc.l %00100000 ; sprite_scale_y ; y scale factor (if scaled) dc.l -1 ; sprite_was_hit ; initially flagged as not hit dc.l 0 ; sprite_CLUT ; no_CLUT (8/16/24 bit) or CLUT (1/2/4 bit) dc.l cant_hit ; sprite_colchk ; if sprite can collide with another dc.l cd_remove ; sprite_remhit ; flag to remove (or keep) on collision dc.l single ; sprite_bboxlink ; single for normal bounding box, else pointer to table dc.l 1 ; sprite_hitpoint ; Hitpoints before death dc.l 2 ; sprite_damage ; Hitpoints deducted from target dc.l 256/2 ; sprite_gwidth ; GFX width (of data) I put this in the assets file: ABS,TITLESCREEN,gfx_clut,assets\oniontitlescreen.bmp The result is a couple of little red and white dots. What am I doing wrong? oniontitlescreen.bmp Quote Link to comment https://forums.atariage.com/topic/320081-showing-8-bit-images/ Share on other sites More sharing options...
+atari2600land Posted April 30, 2021 Author Share Posted April 30, 2021 In each rapinit.s file: "no_CLUT (8/16/24 bit) or CLUT (1/2/4 bit)" in each assets.s file: "For graphics conversion you can use "gfx_clut" or "gfx_noclut" to convert a .BMP file into jaguar raw format and optionally export the paletter or not (clut=yes, noclut=no). This applies to 1-, 2-, 4- and 8-bit graphics only." So which is it? I'm really confused now. Quote Link to comment https://forums.atariage.com/topic/320081-showing-8-bit-images/#findComment-4813482 Share on other sites More sharing options...
+CyranoJ Posted April 30, 2021 Share Posted April 30, 2021 1 hour ago, atari2600land said: This is my image. This is my code in the rapinit.s file: dc.l 256 ; sprite_width ; width of sprite (in pixels) dc.l 256 ; sprite_height ; height of sprite (in pixels) dc.l 256*256*2 ; sprite_framesz ; size per frame in bytes of sprite data dc.l 256*2 ; sprite_bytewid ; width in bytes of one line of sprite data dc.l 256/2 ; sprite_gwidth ; GFX width (of data) 256x256x8bit is not 256x256x2... and gwidth is not 256/2 framesize = 256*256 bytewid=256 gwidth=256 Quote Link to comment https://forums.atariage.com/topic/320081-showing-8-bit-images/#findComment-4813517 Share on other sites More sharing options...
+atari2600land Posted April 30, 2021 Author Share Posted April 30, 2021 Result: 1 Quote Link to comment https://forums.atariage.com/topic/320081-showing-8-bit-images/#findComment-4813526 Share on other sites More sharing options...
+CyranoJ Posted April 30, 2021 Share Posted April 30, 2021 56 minutes ago, atari2600land said: Result: Is that meant to look like that? You really need to provide more information. We just develop these tools, we aren't psionic superhumans. Quote Link to comment https://forums.atariage.com/topic/320081-showing-8-bit-images/#findComment-4813541 Share on other sites More sharing options...
+atari2600land Posted April 30, 2021 Author Share Posted April 30, 2021 No, it's meant to look like the picture I attached in post #1 of the thread. Quote Link to comment https://forums.atariage.com/topic/320081-showing-8-bit-images/#findComment-4813542 Share on other sites More sharing options...
+CyranoJ Posted April 30, 2021 Share Posted April 30, 2021 2 minutes ago, atari2600land said: No, it's meant to look like the picture I attached in post #1 of the thread. And it does, your CLUT is wrong. Quote Link to comment https://forums.atariage.com/topic/320081-showing-8-bit-images/#findComment-4813543 Share on other sites More sharing options...
Iwantgames:) Posted April 30, 2021 Share Posted April 30, 2021 It actually looks kinda cool tho ? Quote Link to comment https://forums.atariage.com/topic/320081-showing-8-bit-images/#findComment-4813809 Share on other sites More sharing options...
+atari2600land Posted April 30, 2021 Author Share Posted April 30, 2021 I fixed it. I wasn't putting jsfLoadClut(strptr(ONION_clut),0,255) in my .bas file. 4 Quote Link to comment https://forums.atariage.com/topic/320081-showing-8-bit-images/#findComment-4813948 Share on other sites More sharing options...
PeterG Posted May 20, 2021 Share Posted May 20, 2021 The ring of flames wasn't too bad though.:D Quote Link to comment https://forums.atariage.com/topic/320081-showing-8-bit-images/#findComment-4827227 Share on other sites More sharing options...
OVERRiDE Posted March 15, 2022 Share Posted March 15, 2022 How do we display 8-bit bitmaps without CLUT? Based on the docs sounds like this should be doable, but I am not having any luck getting these displayed properly. I have an 8-bit (RGB) pixel formatted bitmap, 32x32 pixels I am trying to display, and here is the rapinit sprite definition: ; MARYO_stand_right dc.l 1 ; (REPEAT COUNTER) ; Create this many objects of this type (or 1 for a single object) dc.l is_active ; sprite_active ; sprite active flag dc.w 58,0 ; sprite_x ; 16.16 x value to position at dc.w 141,0 ; sprite_y ; 16.16 y value to position at dc.w 0,0 ; sprite_xadd ; 16.16 x addition for sprite movement dc.w 0,0 ; sprite_yadd ; 16.16 y addition for sprite movement dc.l 32 ; sprite_width ; width of sprite (in pixels) dc.l 32 ; sprite_height ; height of sprite (in pixels) dc.l is_normal ; sprite_flip ; flag for mirroring data left<>right dc.l 0 ; sprite_coffx ; x offset from center for collision box center dc.l 0 ; sprite_coffy ; y offset from center for collision box center dc.l 16 ; sprite_hbox ; width of collision box dc.l 16 ; sprite_vbox ; height of collision box dc.l MARYO_stand_right ; sprite_gfxbase ; start of bitmap data dc.l 8 ; (BIT DEPTH) ; bitmap depth (1/2/4/8/16/24) dc.l is_RGB ; (CRY/RGB) ; bitmap GFX type dc.l is_trans ; (TRANSPARENCY) ; bitmap TRANS flag dc.l 32*32 ; sprite_framesz ; size per frame in bytes of sprite data dc.l 32 ; sprite_bytewid ; width in bytes of one line of sprite data dc.l 0 ; sprite_animspd ; frame delay between animation changes dc.l 0 ; sprite_maxframe ; number of frames in animation chain dc.l ani_rept ; sprite_animloop ; repeat or play once dc.l edge_ignore ; sprite_wrap ; wrap on screen exit, or remove dc.l spr_inf ; sprite_timer ; frames sprite is active for (or spr_inf) dc.l spr_linear ; sprite_track ; use 16.16 xadd/yadd or point to 16.16 x/y table dc.l 0 ; sprite_tracktop ; pointer to loop point in track table (if used) dc.l spr_unscale ; sprite_scaled ; flag for scaleable object dc.l 32 ; sprite_scale_x ; x scale factor (if scaled) dc.l 32 ; sprite_scale_y ; y scale factor (if scaled) dc.l -1 ; sprite_was_hit ; initially flagged as not hit dc.l 0 ; sprite_CLUT ; no_CLUT (8/16/24 bit) or CLUT (1/2/4 bit) dc.l can_hit ; sprite_colchk ; if sprite can collide with another dc.l cd_keep ; sprite_remhit ; flag to remove (or keep) on collision dc.l single ; sprite_bboxlink ; single for normal bounding box, else pointer to table dc.l 0 ; sprite_hitpoint ; Hitpoints before death dc.l 2 ; sprite_damage ; Hitpoints deducted from target dc.l 32 ; sprite_gwidth ; GFX width (of data) Asset Definition: ABS,MARYO_stand_right,gfx_noclut8,ASSETS\GFX\pixmaps\maryo\small\output.bmp And this is the bitmap I am using: output.bmp This is what the sprite looks like, expected result is it should look like the bitmap above, but obviously I am doing something wrong. Thanks in advance for any pointers! Quote Link to comment https://forums.atariage.com/topic/320081-showing-8-bit-images/#findComment-5021749 Share on other sites More sharing options...
xzpecter Posted March 15, 2022 Share Posted March 15, 2022 I believe you still have to load the clut when displaying 8-bit images. The OP is still doing color lookups. The difference with 4-bit images, for example, is you can specify which part of the 256 color table will be used by the OP when writing to the line buffer, the sprite_CLUT. With 8-bit images, sprite_CLUT is ignored and the entire color table is used. Apologies for my rough explanation. I hope it makes sense and helps. 1 Quote Link to comment https://forums.atariage.com/topic/320081-showing-8-bit-images/#findComment-5021779 Share on other sites More sharing options...
+CyranoJ Posted March 15, 2022 Share Posted March 15, 2022 1 hour ago, OVERRiDE said: How do we display 8-bit bitmaps without CLUT? You need to use the entire CLUT, and any 4bpp/2bpp/1bpp palettes will need to be subsets of the full clut for this image. Or, use a 16bit image, which has no clut. 26 minutes ago, xzpecter said: I believe you still have to load the clut when displaying 8-bit images. The OP is still doing color lookups. The difference with 4-bit images, for example, is you can specify which part of the 256 color table will be used by the OP when writing to the line buffer, the sprite_CLUT. With 8-bit images, sprite_CLUT is ignored and the entire color table is used. Apologies for my rough explanation. I hope it makes sense and helps. ^^^ Gold star for zxpecter! Quote Link to comment https://forums.atariage.com/topic/320081-showing-8-bit-images/#findComment-5021799 Share on other sites More sharing options...
OVERRiDE Posted March 15, 2022 Share Posted March 15, 2022 Thank you guys for the reply, perhaps the documentation should be updated as it really gives the impression that 8bit no clut is possible. Either way, I am assuming then we can only have 1 pallette loaded per frame? My use case is I have dozens of textures in use per frame, each with their own pallette, and it would be ideal to have these all be 8 bit to reduce the load on the OP. In the screenshot above the OP really slows down when the whole screen is covered with 16bit sprites Quote Link to comment https://forums.atariage.com/topic/320081-showing-8-bit-images/#findComment-5021840 Share on other sites More sharing options...
+CyranoJ Posted March 15, 2022 Share Posted March 15, 2022 It would be ideal, but the hardware won't let you. ? Quote Link to comment https://forums.atariage.com/topic/320081-showing-8-bit-images/#findComment-5021875 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.