29 March 2024, 16:32 | #1 |
old chunk of coal
Join Date: Nov 2011
Location: Hungary
Posts: 1,304
|
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 |
29 March 2024, 17:32 | #2 |
Registered User
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,160
|
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?
|
29 March 2024, 18:12 | #3 |
old chunk of coal
Join Date: Nov 2011
Location: Hungary
Posts: 1,304
|
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
|
29 March 2024, 19:35 | #4 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,668
|
Id love to see what you're doing with it.
|
29 March 2024, 20:00 | #5 |
old chunk of coal
Join Date: Nov 2011
Location: Hungary
Posts: 1,304
|
A sneak peak:
|
30 March 2024, 00:34 | #6 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,668
|
Doom RPG?
|
30 March 2024, 00:52 | #7 | |
Registered User
Join Date: Jul 2017
Location: San Jose
Posts: 684
|
Quote:
|
|
30 March 2024, 10:12 | #8 |
Registered User
Join Date: Aug 2006
Location: Scunthorpe/United Kingdom
Posts: 2,127
|
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?
|
30 March 2024, 11:47 | #9 |
old chunk of coal
Join Date: Nov 2011
Location: Hungary
Posts: 1,304
|
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. Last edited by BSzili; 30 March 2024 at 12:34. |
31 March 2024, 21:42 | #10 | ||
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,265
|
Quote:
Quote:
|
||
06 April 2024, 19:26 | #11 |
morphos.pl
Join Date: Aug 2014
Location: Kraków, Poland
Posts: 105
|
|
07 April 2024, 08:35 | #12 |
old chunk of coal
Join Date: Nov 2011
Location: Hungary
Posts: 1,304
|
That's not likely as there's no source code for Wolfenstein RPG.
|
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 |
|
|