News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

xm.inc

Started by santa, February 04, 2006, 01:50:13 PM

Previous topic - Next topic

santa

Hey

How can I create xm.inc file  ::) Thanks

gabor

Hello!


Could you be more specific about xm.inc? Maybe only I don't know what xm stands for, anyhow, please share it with me  :bg

Greets, Gábor

santa

he he .... that's right, sorry... xm.inc stands for musik file, but I dont know how to create this file  :'(

source:

db 69,120,116,101,110,100,101,100,32,77,111,100,117,108,101,58
db 32,99,108,97,115,115,32,99,114,97,99,107,116,114,111,35
db 49,53,0,0,0,26,77,79,68,50,88,77,32,49,46,48
db 0,0,0,0,0,0,0,0,0,0,4,1,20,1,0,0
db 12,0,0,0,4,0,10,0,31,0,0,0,6,0,125,0
db 1,9,8,2,0,4,0,3,5,6,5,7,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 9,0,0,0,0,64,0,47,3,155,49,4,4,162,131,49
db 9,155,49,8,4,226,131,61,2,136,4,155,49,9,12,30
db 136,4,128,152,6,1,131,52,9,136,4,147,49,12,55,152
db 6,1,155,49,9,12,30,155,44,8,3,4,147,49,10,55
db 139,49,4,4,131,56,9,139,44,8,4,131,61,1,136,4
db 155,52,9,12,30,136,4,128,152,6,1,131,52,9,139,47
db 8,4,131,61,2,152,6,1,155,56,9,12,30,136,4,128
db 139,61,4,4,131,49,9,139,51,8,4,131,61,3,136,4
db 155,52,9,12,30,155,52,8,3,79,128,139,49,4,4,131
db 52,9,136,4,147,49,12,55,136,4,155,49,9,12,30,155
db 54,8,3,4,147,49,10,55,152,6,1,131,59,9,139,54
db 8,4,131,61,1,152,6,1,155,52,9,12,30,136,4,128
db 139,56,4,4,131,52,9,139,52,8,4,131,61,2,136,4
db 155,59,9,12,30,155,54,8,12,30,128,139,49,4,4,131
db 49,9,139,49,8,4,131,61,2,136,4,155,52,9,12,30
db 136,4,128,152,6,1,131,52,9,155,49,8,12,30,147,49
db 12,55,152,6,1,155,49,9,12,30,155,51,8,3,79,147
db 49,10,55,139,49,4,4,131,56,9,139,49,8,4,131,61
db 2,136,4,155,52,9,12,30,136,4,128,152,6,1,131,52
db 9,136,4,128,152,6,1,155,56,9,12,30,155,44,8,3
db 4,128,139,61,4,4,131,49,9,139,44,8,4,131,61,3
db 136,4,155,52,9,12,30,136,4,128,139,49,4,4,131,52
db 9,155,47,8,3,2,147,49,12,55,136,4,155,49,9,12
db 30,152,3,2,147,49,10,55,152,6,1,131,59,9,155,47
db 8,3,255,131,61,1,152,6,1,155,52,9,12,30,136,4
db 128,139,56,4,4,131,52,9,139,49,8,4,131,61,3,136
db 4,155,59,9,12,30,155,47,8,12,30,128,139,52,4,4
db 131,52,9,139,52,8,4,131,61,2,136,4,155,52,9,12


and so on..


ramguru

Do you want to store, say "melody.xm" in db statements, if that's it so - it's not very clever. You should store xm as resource (say, 9000 XMFILE "Melody.xm") then use LoadLibraryEx...FindResource...LoadResource..LockResource and you have a pointer.

hutch--

Santa,

As long as you know some basic assembler, what you are after is simple enough. If you have the complete DB form of the music as a file of some sort, you only need to produce two variables so you can write it to disk or load it into memory, its starting address and how long it is.

mov eax, OFFSET source    ; get the start address.

The length you will need to know from the file you converted to DB format. If it is a large file, ther more efficient way is to use a toy from very recent versions of masm32 called FDA that creates an object module from any disk file which you link into an EXE file as data.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

santa

Thanks hutch--  :8)

Vortex

Santa,

If you wish to use Poasm, Pelle's new assembler has a special statement to embed binary files in the main module, it's call INCBIN

Bioworm

BIN2ASM Converter

[attachment deleted by admin]