BMP to MZM I'm sure it's been done before
#1
Posted 06 July 2007 - 10:32 PM
Click image to download: BMP to MZM
...yeah. It takes a 16 color BMP saved in MSPaint (doesn't support any different palettes) and makes an MZM out of it. For some reason anything above 80x50 doesn't get read and cut off correctly, and... stuff's explained in the file. Comes with the BMP shown in the above screenshot and a large BMP that I was using to test large files with.
I made this to save myself from the effort of hand-copying stuff like Czar Dragon.
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
#3
Posted 06 July 2007 - 10:50 PM
CHEZZY, on Jul 6 2007, 03:43 PM, said:
yeah, i programmed it specifically so that it would just ignore extra data on big files but apparently i did something wrong somewhere... oh well
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
#5
Posted 07 July 2007 - 01:57 AM
set "$INPUT" "test.bmp" set "$OUTPUTMZM" "test.mzm" set "$OUTPUTPAL" "test.pal" set "commands" "(-1>>1)" set "&$INPUT&" "fread_open" set "$header" "fread10" set "bmpoffset" "('fread_counter'+('fread_counter'<<16))" set "paloffset" "('fread_counter'+('fread_counter'<<16)+14)" set "fread_pos" "paloffset" set "&$OUTPUTPAL&" "fwrite_open" loop start set "$quad" "fread4" set "fwrite" "('$quad.2'/4)" set "fwrite" "('$quad.1'/4)" set "fwrite" "('$quad.0'/4)" loop 15 set "&$OUTPUTMZM&" "fwrite_open" set "$mzmheader" "MZM2" set "$mzmheader" "fwrite4" set "fwrite_counter" 80 set "fwrite_counter" 25 set "fwrite_pos" 16 set "fread_pos" "bmpoffset" set "$scr" "fread2000" set "" "fread_open" loop start set "x" "('loopcount'%40)" set "y" "(24-('loopcount'/40))" set "fwrite" 5 set "fwrite" 223 set "fwrite" "('$scr.('y'*80+'x')'/16*16+('$scr.('y'*80+'x'+40)'/16))" inc "fwrite_pos" 3 set "fwrite" 5 set "fwrite" 223 set "fwrite" "('$scr.('y'*80+'x')'%16*16+('$scr.('y'*80+'x'+40)'%16))" inc "fwrite_pos" 3 loop 999 set "" "fwrite_open"
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
#6
Posted 07 July 2007 - 01:58 AM
Horray for file handling in mzx!
#7
Posted 07 July 2007 - 08:56 AM
- 1bit 160x50 BMP to MZX
- 4bit 80x50 BMP to MZX
- 4colour RAW to MZX charset
- 8bit BMP to HTML
- 8bit 80x25 BMP to SMZX
And of course, 24bit one about which you know already.
#8
Posted 07 July 2007 - 04:22 PM
i guess i'm still absolutely worthless here
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
#9
Posted 07 July 2007 - 05:07 PM
Kuroneko, on Jul 7 2007, 12:22 PM, said:
i guess i'm still absolutely worthless here
heck man I probably would have given up before I even tried looking for one, let alone making my own
#10
Posted 07 July 2007 - 05:27 PM
BTW: make AVI to 8-bit SMZX 80x50 MZMs and you will rock!
This post has been edited by asiekierka: 07 July 2007 - 05:34 PM
#11
Posted 07 July 2007 - 06:22 PM
Quote
Quote
asie, last time i checked nedemai was a girl
and no i am not fucking around with avis because lancer or some shit will post more efficient code and then nedemai or someone will have already made a better one before it all
actually i'm pretty sure she DID make an avi interpreter in mzx
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
#12
Posted 07 July 2007 - 07:42 PM
She didn't.
Well, welcome in club! Nobody cares about me too.
#13
Posted 07 July 2007 - 08:41 PM
asiekierka, on Jul 7 2007, 12:42 PM, said:
I specifically remember her talking about watching south park in mzx one day with a video to mzx engine she made
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
#14
Posted 07 July 2007 - 11:20 PM
I mean I made that RAW thing and that was pretty hard a while ago... but I couldn't take making something like this!
Also, "80x50 MZM saved to..."? Is it not saved in halfchars?
This post has been edited by CJA: 07 July 2007 - 11:21 PM
#15
Posted 08 July 2007 - 12:20 AM
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
#16
Posted 08 July 2007 - 12:25 AM
CJA, on Jul 7 2007, 04:20 PM, said:
hmm... yeah. what it should really say is Xx(Y/2+(Y%2)). i might fix that some time
...but that also means that the mzm is saved twice as big as it should be. I'll go fix that right now.
EDIT: Redownload. The bug should be fixed.
This post has been edited by Kuroneko: 08 July 2007 - 12:31 AM
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
#17
Posted 08 July 2007 - 01:07 AM
Use the header size field and the pointer to the bitmap field to work out where the palette and bitmap data are stored.
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
#18
Posted 08 July 2007 - 01:23 AM
Lancer-X, on Jul 7 2007, 06:07 PM, said:
Oh, so THAT's what those 12 bytes are at the start
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
#19
Posted 08 July 2007 - 01:24 AM
look at the wikipedia page for device-independent bitmaps. it contains the full file format.
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
#20
Posted 10 July 2007 - 04:58 PM
Kuroneko, on Jul 7 2007, 03:41 PM, said:
asiekierka, on Jul 7 2007, 12:42 PM, said:
I specifically remember her talking about watching south park in mzx one day with a video to mzx engine she made
I was watching south park in MZX, but I had converted the audio to ogg and converted all the frames from the avi to tiny little bitmaps. It worked okay except the constant changing of the palette made the video flicker like crazy.
I haven't wrote anything to interpret AVIS in mzx.
#21
Posted 10 July 2007 - 06:12 PM
Nedemai, on Jul 10 2007, 09:58 AM, said:
Kuroneko, on Jul 7 2007, 03:41 PM, said:
asiekierka, on Jul 7 2007, 12:42 PM, said:
I specifically remember her talking about watching south park in mzx one day with a video to mzx engine she made
I was watching south park in MZX, but I had converted the audio to ogg and converted all the frames from the avi to tiny little bitmaps. It worked okay except the constant changing of the palette made the video flicker like crazy.
I haven't wrote anything to interpret AVIS in mzx.
oh, my bad. xD
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository