Updates to bfont

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
User avatar
Quzar
Dream Coder
Dream Coder
Posts: 7485
Joined: Wed Jul 31, 2002 12:14 am
Location: Miami, FL
Contact:

Updates to bfont

Post by Quzar » Tue Oct 23, 2018 10:19 am

Hey all, just wanted to put out a short note about some updates I've made to the bfont access code that introduces some new features.

First is that now you should be able to print bfont to any texture or buffer normally supported by the system: 4, 8, 16, and 32bpp. Previously you could only switch between 16 and 32. The old function is still there, so nothing should break, but you may also now use bfont_draw_str_ex which takes a wider set of parameters and allows for drawing to paletted textures.

The second, more interesting, thing is access to the Dreamcast-specific font characters. These are commonly used in games for prompting a button press, or describing controls. Below is an image of each of them in sequence. To access these, you must first set the encoding mode to raw ( bfont_set_encoding(BFONT_CODE_RAW); ) then as your character use the define name for the character as listed in bfont.h, such as BFONT_UPARROW or BFONT_XBUTTON.

I'll see about updating the bfont example to demonstrate some of this, but I actually wrote this up over a year ago and it rotted a bit because I was waiting until I could provide a better testing suite. If anyone could give it a run-through, it would be greatly appreciated! Hope it's useful :)
Attachments
U2fOxmx.png
U2fOxmx.png (3.48 KiB) Viewed 1329 times
"When you post fewer lines of text than your signature, consider not posting at all." - A Wise Man
User avatar
lerabot
Insane DCEmu
Insane DCEmu
Posts: 114
Joined: Sun Nov 01, 2015 8:25 pm

Re: Updates to bfont

Post by lerabot » Tue Oct 23, 2018 10:55 am

Ah! A sweet little bfont update ;)
mrneo240
DCEmu Crazy Poster
DCEmu Crazy Poster
Posts: 27
Joined: Wed Mar 14, 2018 12:22 am

Re: Updates to bfont

Post by mrneo240 » Mon Nov 19, 2018 1:20 am

Did you take my code....
mrneo240
DCEmu Crazy Poster
DCEmu Crazy Poster
Posts: 27
Joined: Wed Mar 14, 2018 12:22 am

Re: Updates to bfont

Post by mrneo240 » Mon Nov 19, 2018 1:24 am

https://github.com/mrneo240/neoIP/blob/ ... ossymbol.c

used with offsets from here

http://submarine.org.uk/info/biosfont/

Supports any of those symbols listed.
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5365
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Contact:

Re: Updates to bfont

Post by BlueCrab » Mon Nov 19, 2018 2:53 pm

I'm pretty sure that most of the world knew about all the extra symbols in the font for a really long time, considering that Marcus' documentation on the system calls (including the font stuff) has been around for more than 17 years at this point.

That, and quzar actually did a good portion of his changes to the bfont stuff quite a while ago, only recently finishing it up and releasing it.
User avatar
Quzar
Dream Coder
Dream Coder
Posts: 7485
Joined: Wed Jul 31, 2002 12:14 am
Location: Miami, FL
Contact:

Re: Updates to bfont

Post by Quzar » Wed Dec 12, 2018 3:01 pm

mrneo240 wrote:
Mon Nov 19, 2018 1:24 am
https://github.com/mrneo240/neoIP/blob/ ... ossymbol.c

used with offsets from here

http://submarine.org.uk/info/biosfont/

Supports any of those symbols listed.
I was wholly unaware of you or your code. I wrote this a few years ago and only now got around to polishing it and releasing it. The code you linked to is a modified version of libdream's code which is sufficiently similar to what was in KOS to begin with. The expansion of the available symbols that I did (using Marcus' info as described here ) was actually the more minor part of my update compared to allowing the font to be written to any texture type.

Funnily enough, I did use the name you are using for your project 'NeoDC' for my NeoGeo CD Emulator project back 10-13 years ago :) some things are just simple and only have certain ways of doing them, it doesn't mean they're copied.

I've followed your IP.BIN update project. Looks interesting!
"When you post fewer lines of text than your signature, consider not posting at all." - A Wise Man
mrneo240
DCEmu Crazy Poster
DCEmu Crazy Poster
Posts: 27
Joined: Wed Mar 14, 2018 12:22 am

Re: Updates to bfont

Post by mrneo240 » Wed Dec 12, 2018 3:06 pm

Quzar wrote:
Wed Dec 12, 2018 3:01 pm
mrneo240 wrote:
Mon Nov 19, 2018 1:24 am
https://github.com/mrneo240/neoIP/blob/ ... ossymbol.c

used with offsets from here

http://submarine.org.uk/info/biosfont/

Supports any of those symbols listed.
I was wholly unaware of you or your code. I wrote this a few years ago and only now got around to polishing it and releasing it. The code you linked to is a modified version of libdream's code which is sufficiently similar to what was in KOS to begin with. The expansion of the available symbols that I did (using Marcus' info as described here ) was actually the more minor part of my update compared to allowing the font to be written to any texture type.

Funnily enough, I did use the name you are using for your project 'NeoDC' for my NeoGeo CD Emulator project back 10-13 years ago :) some things are just simple and only have certain ways of doing them, it doesn't mean they're copied.

I've followed your IP.BIN update project. Looks interesting!
it was just banter at late o'clock. i surely didnt intend you had or even if you did it wouldn't be an issue. i was alerted to your neo geo emulator by a fellow redditor a few months ago, funny you own the name first.

take care!
User avatar
Quzar
Dream Coder
Dream Coder
Posts: 7485
Joined: Wed Jul 31, 2002 12:14 am
Location: Miami, FL
Contact:

Re: Updates to bfont

Post by Quzar » Wed Dec 12, 2018 3:16 pm

mrneo240 wrote:
Wed Dec 12, 2018 3:06 pm
Quzar wrote:
Wed Dec 12, 2018 3:01 pm
mrneo240 wrote:
Mon Nov 19, 2018 1:24 am
https://github.com/mrneo240/neoIP/blob/ ... ossymbol.c

used with offsets from here

http://submarine.org.uk/info/biosfont/

Supports any of those symbols listed.
I was wholly unaware of you or your code. I wrote this a few years ago and only now got around to polishing it and releasing it. The code you linked to is a modified version of libdream's code which is sufficiently similar to what was in KOS to begin with. The expansion of the available symbols that I did (using Marcus' info as described here ) was actually the more minor part of my update compared to allowing the font to be written to any texture type.

Funnily enough, I did use the name you are using for your project 'NeoDC' for my NeoGeo CD Emulator project back 10-13 years ago :) some things are just simple and only have certain ways of doing them, it doesn't mean they're copied.

I've followed your IP.BIN update project. Looks interesting!
it was just banter at late o'clock. i surely didnt intend you had or even if you did it wouldn't be an issue. i was alerted to your neo geo emulator by a fellow redditor a few months ago, funny you own the name first.

take care!
I'm glad to hear. Sorry then for taking it seriously, it's hard to tell at times via text ;)
"When you post fewer lines of text than your signature, consider not posting at all." - A Wise Man
Post Reply