|
ForumsSega Master System / Mark III / Game GearSG-1000 / SC-3000 / SF-7000 / OMV |
Home - Forums - Games - Scans - Maps - Cheats - Credits Music - Videos - Development - Hacks - Translations - Homebrew |
Author | Message |
---|---|
|
bmp2tile.exe fails to work with PNG file format
Posted: Wed Feb 12, 2020 4:33 pm
|
I'm testing out some tutorials from over at https://www.elotrolado.net/hilo_tutorial-muy-basico-de-c-para-master-system_2208...
I have my environment setup and wanted to pack some tile data so I copied the example png image into a 'gfx' folder, added bmp2tile to my path and added the following line to my batch script: bmp2tile.exe ..\gfx\SegaMasterSystemTitleScreen.png -savetiles .\bank1\backgroundtiles.psgcompr -mirror -removedupes -savepalette .\bank1\backgroundpalette.bin -savetilemap .\bank1\backgroundtilemap.bin -exit
For some unknown reason, it just reports back that png is unsupported which seems like something incorrect to me. Has anyone had a similar issue and been able to resolve it? Many thanks |
|
|
Posted: Wed Feb 12, 2020 6:42 pm |
24bits ? | |
|
Posted: Wed Feb 12, 2020 9:52 pm |
Actually, I just saved the same image from the example website. It's 32 bit. |
|
|
Posted: Wed Feb 12, 2020 10:08 pm |
Perhaps some de-optimization for the web. BMP2Tile expects you to manage the palette manually, ie to only give it images with 16 or fewer colours. | |
|
Posted: Wed Feb 12, 2020 10:46 pm |
Ahh yeah, cool. Worked. I have no idea why a demo would provide an image that doesn't actually work :/ Well, I reduced the colours in Paint Shop Pro and it's now working fine. Cheers |
|
|
Posted: Thu Feb 13, 2020 9:36 am |
Hi! Original tutorial author here!
I just downloaded the image I linked on the tutorial, and it has the right palette: How have you downloaded it? Remember that you have to press open-download from the dropbox web interface otherwise, you're downloading the preview image that they're generating. |
|
|
Posted: Thu Feb 13, 2020 10:14 am |
Side note: the newer rewrite of BMP2Tile is more command line friendly and may give a better error here. | |
|
Posted: Thu Feb 13, 2020 8:44 pm |
I'm not sure, perhaps I just dragged the image and that was my problem. I guess that there is something that dropbox is doing to the preview image. It's working great now anyway and thanks for the rest of the tutorial which is great :) |
|
|
Posted: Thu Feb 13, 2020 9:42 pm |
:)
|
|
|
Posted: Fri Feb 14, 2020 7:19 am |
It looks amazing! :-D | |
|
Posted: Fri Feb 14, 2020 11:05 am |
you don't even need to call SMS_init() as the crt0 code already does it for you :)
also, I'd load the palette, tiles and tilemap before turning screen on, unless you love the way it progressively appears on screen (barely noticeable, anyway) |
|
|
Posted: Sat Feb 15, 2020 9:38 am |
Cheers for the advice. Actually, I had discovered that I can remove that line but added it back for completeness before I later go in an evaluate each function asm. Great points and I'm taking it all in and will edit according to your feedback :D - kusfo Many thanks for your tutorial, it's a great resource. :) |
|
|
Posted: Sat Feb 15, 2020 2:44 pm |
Great! :-D
The tutorial is a bit outdated, but I think it's quite a good starting point :-D |
|
|
Posted: Sat Feb 15, 2020 8:42 pm |
I decided to attempt to convert a psg file https://www.smspower.org/Music/BatmanReturns-SMS Stage 1. I used vgm2psg with: > vgm2psg batman.vgm music.psg 23
in an attempt to retrieve all channels? I then set up the PSG by calling both: PSGPlay(music_psg);
PSGSFXPlay(music_psg, 0x01|0x02); ... PSGFrame(); PSGSFXFrame(); However, I can clearly hear that there is a missing channel. I also tried with another track, Title Screen from Alien 3. That also seemed to be missing a channel. Any ideas why this might occur? |
|
|
Posted: Sat Feb 15, 2020 9:36 pm |
to convert background music, you should NOT specify any channel on the command line, so you just need to do:
vgm2psg batman.vgm music.psg
then you need just PSGPlay and PSGFrame, not the SFX functions. |
|
|
Posted: Sat Feb 15, 2020 9:56 pm |
Sorry, yeah, I was showing both options that I'd tried (I wasn't trying simultaniously), and I was sure that I tried your option first with Alien 3 title screen, but clearly I didn't since I just tried again and it's working perfectly for Batman. lol Many thanks |
|