Skip to content

LDP1450: Added preliminary support for custom On Screen Text mode. #13490

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

james-wallace-ghub
Copy link
Member

New working system

Vision Quest [James Wallace, Jeff Anderson, Dragon's Lair Project]

@james-wallace-ghub
Copy link
Member Author

Given the size of the CHD here, I've given access to Tafoid if its needed for review. Any feedback on the OSD functions here is greatly appreciated.

Comment on lines +899 to +926
bitmap_yuy16 sony_ldp1450hle_device::osd_char_gen(uint8_t idx)
{
uint16_t white = 0xeb80;
uint16_t black = 0x0080;

// iterate over pixels
const u16 *chdataptr = &text_bitmap[idx][0];

bitmap_yuy16 char_bmp = bitmap_yuy16(16,16);
for (u8 y = 0; y < 16; y++)
{
u16 chdata = *chdataptr++;

for (u8 x = 0; x < 16; x++, chdata >>= 1)
{
if (chdata & 0x01)
{
char_bmp.pix(y, x) = white;
}
else
{
char_bmp.pix(y, x) = black;
}
}
}
return char_bmp;
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This kind of on-the-fly generation looks inefficient, but I probably need to play with the driver at hand to find a better way to do it (for example it may be just a single texture that scissors the necessary content instead of instantiating 96 different bitmap_yuy16 (sic)).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I didn't particularly care for it, but it's something I'd like feedback on. The whole draw texture to scale and overlay probably needs a look at. I'll fix the other issues you mention at least, so there's a better framework to work on.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this overlay stuff documented anywhere?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Furthermore, Matt Ownby did some probing of real hardware to see if there was a simpler approach, for completeness I'll link to that blog post. I got a bit more out of that than the manual to be fair
https://my-cool-projects.blogspot.com/2013/04/sony-ldp-1450-text-overlay-horizontal.html

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a whole lot of tech debt on the LD department, not confined to this core alone. Been pondering from a while if we are ready for real RS-232C comms with a computer, manual mentions SMC-70 and SMC-3000/DOS-compatible capable at very least.

I'll probably merge this as-is when I'm ready and willing to do stuff there.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, my experience with this was with the PAL version and an MSX over the native basic, surprisingly versatile. If you don't need any more from this end then I'm happy to hand this off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants