English Amiga Board


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

 
 
Thread Tools
Old 29 March 2024, 16:32   #1
BSzili
old chunk of coal
 
BSzili's Avatar
 
Join Date: Nov 2011
Location: Hungary
Posts: 1,289
RGB565 to HAM8 RGB666

I'd like to display a 16-bit RGB565 chunky image on a HAM8 screen. I found a C2P routine which works nicely, but it only produces an RGB555 bitmap, so the brightness is halved:
https://github.com/Kalmalyzer/kalms-...rgb555h8_040.s
I'm wondering if it'd be possible to modify this routine to produce an RGB666 bitmap instead
BSzili is offline  
Old 29 March 2024, 17:32   #2
robinsonb5
Registered User
 
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,153
Wouldn't it be much easier to shuffle the bitplane pointers so you move plane 5 -> plane 6, etc, making the blank plane the least significant rather than most significant?
robinsonb5 is offline  
Old 29 March 2024, 18:12   #3
BSzili
old chunk of coal
 
BSzili's Avatar
 
Join Date: Nov 2011
Location: Hungary
Posts: 1,289
D'oh, thanks for the tip! I didn't even think of that I tried it and it looks fine, white comes out as (248,248,248) which works for me
BSzili is offline  
Old 29 March 2024, 19:35   #4
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,165
Id love to see what you're doing with it.
Karlos is online now  
Old 29 March 2024, 20:00   #5
BSzili
old chunk of coal
 
BSzili's Avatar
 
Join Date: Nov 2011
Location: Hungary
Posts: 1,289
A sneak peak:
BSzili is offline  
Old 30 March 2024, 00:34   #6
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,165
Doom RPG?
Karlos is online now  
Old 30 March 2024, 00:52   #7
pipper
Registered User
 
Join Date: Jul 2017
Location: San Jose
Posts: 653
Quote:
Wouldn't it be much easier to shuffle the bitplane pointers so you move plane 5 -> plane 6, etc, making the blank plane the least significant rather than most significant?
You could even go one step further and make it so that the screen is reusing the same bitplane for bit 0 and 1.
pipper is offline  
Old 30 March 2024, 10:12   #8
Dunny
Registered User
 
Dunny's Avatar
 
Join Date: Aug 2006
Location: Scunthorpe/United Kingdom
Posts: 1,998
Quote:
Originally Posted by pipper View Post
You could even go one step further and make it so that the screen is reusing the same bitplane for bit 0 and 1.
I was wondering about that. By bumping up by one bitplane you're effectively doubling the brightness of each pixel, which would render intentionally dark pixels lighter than intended?
Dunny is offline  
Old 30 March 2024, 11:47   #9
BSzili
old chunk of coal
 
BSzili's Avatar
 
Join Date: Nov 2011
Location: Hungary
Posts: 1,289
Not quite, bumping the bitplanes doesn't add to the color values, but multiplies them. It originally produced an image with colors in the 0-127 range, and that gets expanded back to 0-248. This would mean you lose some in-between colors, but since it's only RGB565 no channel gets squashed.

Quote:
Originally Posted by Karlos View Post
Doom RPG?
Yep Used to play the J2ME version a lot back in high school.

Last edited by BSzili; 30 March 2024 at 12:34.
BSzili is offline  
Old 31 March 2024, 21:42   #10
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,105
Quote:
Originally Posted by pipper View Post
You could even go one step further and make it so that the screen is reusing the same bitplane for bit 0 and 1.
Maybe that's what you mean, but you want to fill LSB's from MSB's, not other way round right, i.e 0b11110 -> 0b111101 not 0b111100?

Quote:
Originally Posted by BSzili View Post
Not quite, bumping the bitplanes doesn't add to the color values, but multiplies them. It originally produced an image with colors in the 0-127 range, and that gets expanded back to 0-248. This would mean you lose some in-between colors, but since it's only RGB565 no channel gets squashed.
Yep Used to play the J2ME version a lot back in high school.
Nice, also think this is the only mobile game I ever completed
paraj is offline  
Old 06 April 2024, 19:26   #11
waldiamiga
morphos.pl
 
waldiamiga's Avatar
 
Join Date: Aug 2014
Location: Kraków, Poland
Posts: 104
Quote:
Originally Posted by paraj View Post
Nice, also think this is the only mobile game I ever completed
Apart from DoomRPG, I also finished the similar Wolfenstein RPG, which was also great to play. Maybe BSzili will make a port of this game as well
waldiamiga is offline  
Old 07 April 2024, 08:35   #12
BSzili
old chunk of coal
 
BSzili's Avatar
 
Join Date: Nov 2011
Location: Hungary
Posts: 1,289
That's not likely as there's no source code for Wolfenstein RPG.
BSzili 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
Optimizing HAM8 renderer. Thorham Coders. Asm / Hardware 5 22 June 2017 18:29
HAM8 screen question. Thorham Coders. General 28 04 April 2011 19:26
HAM8 C2P Hacking NovaCoder Coders. General 2 25 March 2010 10:37
fast HAM8 conversion ? meynaf Coders. General 237 23 February 2008 08:58
Multiple HAM8 pictures? killergorilla support.Other 4 15 February 2007 14:41

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 14:53.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.08263 seconds with 13 queries