Jump to content
  • 0
CookingMama

Building on OpenBSD

Question

I realize that bsd and unix likes as a whole aren't a target currently but since the only dependency was sdl2 I figured I'd give compiling it a shot.

 

it actually compiled with gnu make without any errors, "Sweet!" I thought.

 

then I try to run it and I get a segmentation fault. No problem, I know my way around a C code base.

So I pop it in gdb and find out that the literal 2nd line of code ran fails.

451    char *base_path = SDL_GetBasePath();

the app doesn't check if SDL returns a valid pointer, so that's a bug! I just added two lines to fix it...

452    if (!base_path)

453        base_path = SDL_strdup("./");

then I copied over a "x16emu" to a copy of the current linux release (kyoto), just to have the rom.bin, and I run into the next issue.

 

I really don't know how to fix this next one, the app is just stuck on a blue screen. it's like everything works but the main logo and basic prompt just don't load. any advice?

Share this post


Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Blue screen means it's the wrong version of the ROM.  If you're building the most recent commit of the emulator, then you also need to build the most recent commit of the ROM.  I've attached it here, but if the emulator updates further and you compile it again and it goes back to a blue screen then you'll need to recompile the ROM.

rom.bin

  • Like 1

Share this post


Link to post
Share on other sites
  • 0

I'm..... not even sure what you're doing.....

Are you actually compiling BSD into a bin and putting it into the X16 emulator as one of its ROM banks?????

Is that even DOABLE??

I mean... how does BSD only compile down to 16K in the first place...?

 

Share this post


Link to post
Share on other sites
  • 0

OH!   You're trying to build the EMULATOR on BSD!

Whew!

 

  • Haha 1

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, rje said:

I'm..... not even sure what you're doing.....

Are you actually compiling BSD into a bin and putting it into the X16 emulator as one of its ROM banks?????

Is that even DOABLE??

I mean... how does BSD only compile down to 16K in the first place...?

Back in the late 80s I think it was, there was this company that got a bit of press for developing what they called "Web Compression". This is before there was a world wide web. Anyway, it had the "interesting" property that it had 16 to 1 lossless compression on any data exceeding 64K. So you could take 1G of data and compress it down to 64M. Then you could feed that in and get it down to just 4M! Then 256K! Then one more time to exactly 16K!

I think if they found a way that data could be compressed iteratively until they got it under 64K, that algorithm could do just about anything, up to and including running x86-64 builds of an operating system on a 65C02. 🙂

Share this post


Link to post
Share on other sites
  • 0
31 minutes ago, Ender said:

Blue screen means it's the wrong version of the ROM.  If you're building the most recent commit of the emulator, then you also need to build the most recent commit of the ROM.  I've attached it here, but if the emulator updates further and you compile it again and it goes back to a blue screen then you'll need to recompile the ROM.

rom.bin 112 kB · 2 downloads

I feel like an idiot, this seems so obvious. They even tell you in the documentation.

 

I'll probs add a pull request for the two line fix just so they can advertise that OpenBSD is a supported platform.

  • Like 4

Share this post


Link to post
Share on other sites
  • 0
Posted (edited)
20 hours ago, Scott Robison said:

Back in the late 80s I think it was, there was this company that got a bit of press for developing what they called "Web Compression". This is before there was a world wide web. Anyway, it had the "interesting" property that it had 16 to 1 lossless compression on any data exceeding 64K. So you could take 1G of data and compress it down to 64M. Then you could feed that in and get it down to just 4M! Then 256K! Then one more time to exactly 16K!

I believe FORTUNE has an entry related to that:

 

Quote

rm -rf *: 100% compression!

 

Edited by rje

Share this post


Link to post
Share on other sites
  • 0

I decided to test this myself using a virtual machine. After successfully building and running the emulator on OpenBSD, I wanted to see if it was possible on FreeBSD. I discovered that the emulator also runs on FreeBSD, and doesn't require any modifications to function.

VirtualBox_FreeBSD_15_05_2021_20_25_18.thumb.png.a1877755614f2cb4e7f92b70c0e631c2.png

Strangely, neither OpenBSD nor FreeBSD is able to open the SD card image in "r+b" mode. Changing the mode to "rb" allows the SD card to be used. This may be an issue with SDL.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Please review our Terms of Use