Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Convert a PNG to tiles without BMP2Tiles

Reply to topic
Author Message
  • Joined: 20 Nov 2020
  • Posts: 3
  • Location: France
Reply with quote
Convert a PNG to tiles without BMP2Tiles
Post Posted: Fri Nov 20, 2020 8:41 pm
Hello! I'm new here, because I decided to learn about the programming on Master System. To continue my learning, I need to know how to convert a PNG to tiles for the Master System.

I couldn't find any examples or indications on Google. I would like a simple example in order to create my own tool that will work in Linux like I did for the Mega Drive.

Why not use BMP2Files directly? It doesn't work on Linux even with Wine.

Thanks for your help :)
  View user's profile Send private message Visit poster's website
  • Joined: 25 Feb 2006
  • Posts: 863
  • Location: Belo Horizonte, MG, Brazil
Reply with quote
Post Posted: Fri Nov 20, 2020 9:43 pm
Welcome to the forum!

kentosama wrote
It doesn't work on Linux even with Wine.


Actually, I have used BMP2Tiles successfully on Linux with Wine; to be fair, it was called through the command line rather than through the interface, but worked okay, nevertheless.

As an alternative, you may try https://github.com/grz0zrg/bmp2sms
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14687
  • Location: London
Reply with quote
Post Posted: Sat Nov 21, 2020 8:59 am
The older versions may work as they are straight win32, newer ones are using .net so you may need to use Mono. I may see if it ports nicely to .net 5...
  View user's profile Send private message Visit poster's website
  • Joined: 20 Nov 2020
  • Posts: 3
  • Location: France
Reply with quote
Post Posted: Sat Nov 21, 2020 1:54 pm
@haroldoop thanks a lot :) Currently when I run BMP2Tile with Wine, the GUI does not display correctly and freeze. I tried the command line version, but it stops immediately after running:

[kentosama@archlinux bmp2tile-0.5]$ wine BMP2Tile.exe ~/Workspace/SMS/sonic.png
00f4:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION


I installed the wine-mono package but it's the same. Maybe I should actually install the Mono environment as suggested by @Maxim

I will try bmp2sms :)

However, I would have liked to have understood how to create the binary file for my learning, it's exciting.

Thanks a lot for your help :)

edit: I just used bmp2sms, it's a tool that gives all the information. I now see how to create the binary file or prepare the data.
  View user's profile Send private message Visit poster's website
  • Joined: 23 Aug 2009
  • Posts: 213
  • Location: Seattle, WA
Reply with quote
Post Posted: Sat Nov 21, 2020 5:33 pm
I’ve got an example using straight Python code that optimizes tiles here:

https://github.com/SavagePencil/RetroGraphicsToolkit/blob/master/examples/Unique...
  View user's profile Send private message
  • Joined: 04 Jul 2010
  • Posts: 539
  • Location: Angers, France
Reply with quote
Post Posted: Sun Nov 22, 2020 4:24 am
You can use png2tiles from efry.
It's a Bmp2tiles clone but only in command line. No problem to compile and use it on unix.

Old Bmp2tiles work also without problem (with wine or playonmac... On Mac, lol) . Unfortunately, same problem with recent Bmp2tiles version. Even with mono, impossible to compile/run it on my side.

PS. You can also easily manipulate png with python and PIL library.
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 3761
  • Location: Stockholm, Sweden
Reply with quote
Post Posted: Sun Nov 22, 2020 4:51 pm
I can run both old versions (0.4x) of BMP2Tile and new versions (0.5x, 0.6x) on wine (wine-5.0.3) on my Linux Mint. Can't remember if I had to install something more than that to make it work, probably Mono...
  View user's profile Send private message Visit poster's website
  • Joined: 20 Nov 2020
  • Posts: 3
  • Location: France
Reply with quote
Post Posted: Fri Nov 27, 2020 8:42 pm
ichigobankai wrote
You can use png2tiles from efry.
It's a Bmp2tiles clone but only in command line. No problem to compile and use it on unix.

Old Bmp2tiles work also without problem (with wine or playonmac... On Mac, lol) . Unfortunately, same problem with recent Bmp2tiles version. Even with mono, impossible to compile/run it on my side.

PS. You can also easily manipulate png with python and PIL library.


Hi! Yes, finally i wrote a rescomp like SGDK in C++ with Qt. This has several advantages since the data is generated for direct use in code.
  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!