-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
base: master
Are you sure you want to change the base?
LDP1450: Added preliminary support for custom On Screen Text mode. #13490
Conversation
…ecking against hardware). New working system ------------------ Vision Quest [James Wallace, Jeff Anderson, Dragon's Lair Project]
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. |
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; | ||
} | ||
|
There was a problem hiding this comment.
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)).
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a programming manual, that sort of explains it:
https://www.dragons-lair-project.com/tech/manuals/[Sony_LDM-G1000_Protocol_and_Command_Manual_for_Sony_LDP_Series_Videodisc_Players.pdf](https://www.dragons-lair-project.com/tech/manuals/Sony_LDM-G1000_Protocol_and_Command_Manual_for_Sony_LDP_Series_Videodisc_Players.pdf)
Page 44 of the PDF talks through the controls, and the appendix in 62 shows the charset, such as it is.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
New working system
Vision Quest [James Wallace, Jeff Anderson, Dragon's Lair Project]