Play Amiga protracker files on MSX

Página 2/2
1 |

Por ToriHino

Hero (543)

Imagen del ToriHino

02-06-2020, 11:49

As for RoboPlay: as far as i'm concerned it is published under the WTFPL license, so no toe stepping here :-).

Por Bengalack

Master (135)

Imagen del Bengalack

05-06-2020, 15:19

SjaaQ wrote:

If you use the code in other software I would be nice if you credit the author and send a copy of the software which is using the player code. If more people would use the code there would be more software with OPL4 support. That would be a win for the community.

@SjaaQ - I looked at the sources and they seem like they should be able to be compiled using Glass. I tried, and it complains about some missing symbols. First I thought that sub_callback.asm should just be included in nmp.asm, but there are some other missing symbols too like v_PAGMEM, mt_PAGMEM_MOD, v_ADRMEM, mt_ADRMEM_MOD. Would be super nice if you have some info on how to get it to compile Smile

Por SjaaQ

Expert (119)

Imagen del SjaaQ

05-06-2020, 18:36

Indeed there is no real documentation on that. I figured if needed, somebody would ask for it.

The sub_callback is just an example. You need to modify it to suit your needs. Basically the callbacks are just there so you can use different memory management or loading methods. If you find the call for those in the nmp.asm maybe that will make stuff more clear. I can also write up a wrapper that just loads and plays a file.

The modplayer (com file) uses "normal" calls to DOS, I'm working on another project that does that very differently.

mt_memoryInit: Initialize the mapper if you need to do that. Otherwise just "RET"
mt_memorySet: Passes the pattern data address in carryflag+DE. You need to remap that to some other location and set the mapper. I am using the higest 2 bytes of DE and the carry flag (so max 128KB) and select the corresponding memory mapper page. After that I set bit 7 and reset bit 6 of D so it gets remapped to #8000-#BFFF.
mt_loadData: Loads data somewhere that is not persistent (sample data is moved to SRAM). You will be needing the mod header until loading is finished. I use #4000-#7FFF and set the q_samploadbuffersize to #2000 so it will split up the loading of sampes in 8KB blocks. Note that if your are loading from a file, it needs to be opened first.
mt_loadPattern: Loads data that is persistent (pattern data only). When entering carry flag and DE specifies the MOD pattern address.
mt_progressLoadSample: You put in RET. It is used if you want to do some progress display on the load process. The COM player uses it to dispay the number of samples loaded on screen.

If you need some help and I am not responding of the thread, just send me an email.

Por Bengalack

Master (135)

Imagen del Bengalack

05-06-2020, 21:26

Ah, ok, nice. Thanks a lot!

Por Bengalack

Master (135)

Imagen del Bengalack

10-06-2020, 10:24

SjaaQ wrote:

I can also write up a wrapper that just loads and plays a file.

Could you? A simple sample would make it many times faster to get up and running with the code.

Por SjaaQ

Expert (119)

Imagen del SjaaQ

10-06-2020, 21:05

I have added a wrapper (demo.asm) to the source:

https://nopmsx.nl/download/nmp/v2.0/nmp_sources.zip

Por Bengalack

Master (135)

Imagen del Bengalack

11-06-2020, 19:29

Oooh! Thank you very much! A quick look at this and it looks like things are done in a clean and pretty straightforward way. Much easier to understand now. Great! Smile Can't wait to look more into this. Thanks again, and thanks for the fast response!

Página 2/2
1 |