ChanServ changed the topic of ##yamahasynths to: Channel dedicated to questions and discussion of Yamaha FM Synthesizer internals and corresponding REing. Discussion of synthesis methods similar to the Yamaha line of chips, Sound Blasters + clones, PCM chips like RF5C68, and CD theory of operation are also on-topic. Channel logs: https://freenode.irclog.whitequark.org/~h~yamahasynths
Xyz_39808 has joined ##yamahasynths
_whitelogger has joined ##yamahasynths
ejs__ has quit [Quit: Leaving]
ej5 has joined ##yamahasynths
_whitelogger has joined ##yamahasynths
andlabs has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<cr1901_modern> fseidel: I asked this before, but... you've done a MOD player before, correct? Can you confirm that MOD is a horrific format and I should abandon all hope?
andlabs has joined ##yamahasynths
<fseidel> cr1901_modern: yes
<fseidel> can confirm
<fseidel> it's absolutely fucking awful
<fseidel> and there's no one true MOD format
<fseidel> you'll find a ton of mods that don't play quite right because they're expecting quirks of whatever tracker/replayer the author used
<fseidel> for example: some mods expect a buggy row jump implementation and won't play in the right order unless that's implemented
<fseidel> or expect arbitrary clamping on slides
<fseidel> or all sorts of other joys
<fseidel> There's no way to tell what behavior a mod expects, and the entire format is generally a mess of poor design choices
<fseidel> I'm not sure what you want to do, but if this is just an exercise for fun, PT3 was a good time once I got past the fact that the docs were in russian and slightly incorrect
<cr1901_modern> fseidel: Actually, what I want to do is probably even worse
<cr1901_modern> than a MOD player
<cr1901_modern> after 20 mins of research
<fseidel> what could be worse?
<cr1901_modern> I wanted to play the Ghoul's n Ghosts soundtrack for Amiga. Turns out that's not a MOD.
<cr1901_modern> That's Tim Follin's custom format
<cr1901_modern> And nobody ever RE'd it
<cr1901_modern> so they use a blob of 68k code to play those files
<cr1901_modern> that implements a player for the format
<fseidel> welp
<cr1901_modern> I mean, that's one solution...
<cr1901_modern> wonder how they figured out which blob of 68k code was the correct one, and how they found the correct addresses to load the data.
<cr1901_modern> Amiga doesn't strike me as a wonderful platform for doing RE work
<cr1901_modern> fseidel: Anyways I think I'll reconsider a MOD player "for fun". I'm looking for "something that'll take a few days to complete to pass the time during my final treatment" to do.
<fseidel> I'd wager that Follin's player is probably a lot more reasonable than MOD
<fseidel> Chris Huelsbeck's certainly is
<cr1901_modern> But do I want to RE it? Granted, I like 68k code, I just I figure that'll take the whole time I'm there :P.
<cr1901_modern> https://gitlab.com/uade-music-player/uade/blob/master/players/TimFollin Anyways, this is the player, haven't tried disassembling it yet
<fseidel> do you know what address it wants to be loaded at?
<cr1901_modern> nope :) (I can read the source of course... I imagine UADE knows the address)
<fseidel> I piped the blob into 68K objdump and got out gibberish, so presumably I have the wrong start offet
<fseidel> *offset
<cr1901_modern> https://github.com/cr1901/m68kdis This is the disassembler I use
<cr1901_modern> I'll try myself now
<fseidel> does that disassembler work on 64-bit *nix?
<cr1901_modern> It's C89, so probably
<cr1901_modern> (Assumes 32-bit int)
<fseidel> int is still 32-bit on every *Nix I know of
<fseidel> sizeof(long) went to 64 and sizeof(long long) stayed at 64
<cr1901_modern> Yup, so should be good :D. I've never tried it on *nix, but it compiles just fine on Windoze w/ gcc. It was _developed_ for old *nix systems, so I'm assuming it'll behave properly
<fseidel> Windows kept sizeof(long)==32 for backwards compatibility, so it may still not be happy
<fseidel> but we'll see
<cr1901_modern> I do see something sane near the beginning
<cr1901_modern> http://ix.io/202l
<cr1901_modern> CMP.W{6,12,18,24}(A0),D1
<cr1901_modern> gonna do a grep to see if I can figure out the load address
kiboneu is now known as cnomad
<cr1901_modern> https://gitlab.com/uade-music-player/uade/blob/master/src/uade.c#L914-917 A few lines later, the player is relocated... not sure how that works (maybe the player binary is a relocatable format?)
<cr1901_modern> Anyways, I should actually study the Amiga memory map before undertaking this... apparently it has a bunch of memory banks/different memory types (Fast RAM, Kickstart, etc)
<fseidel> not sure how useful this is
<fseidel> but in X68K land, we use DIS.X
<fseidel> which is AMAZING
<fseidel> it's a native X68K program written in 68K assembler, but it runs well in run68 (basically WINE for CLI X68K programs)
<fseidel> (run68 is windows-only but you can run it in WINE, for nested emulation goodness)
<cr1901_modern> The prospect of writing my own 68k disassembler is horrifying
<fseidel> I don't know how its heuristics would do since this doesn't do X68K DOSCALLs or whatever, but it's pretty grea
<fseidel> t
<cr1901_modern> fseidel: Well, the only actually _good_ modern 68k disassembler I'm aware of is IDA, which I refuse to use on principle. Ghidra and r2 were broken last I checked, maybe Binja is okay
<cr1901_modern> If someone managed to create a 68k disassembler, on the x68k, in 68k, all the power to them :P
<cr1901_modern> As much as I love reading it, the encoding is utterly horrific
<TD-Linux> how is ghidra broken?
<cr1901_modern> I don't know, I asked someone in here whether Ghidra choked on 68k code (actually I thought it was you, TD-Linux), and they said it did. I didn't follow up.
<TD-Linux> ok. because I used it for the x68k ipl and it was fine
<cr1901_modern> Then I'll try it again. Can't be worse than r2
<andlabs> oh that reminds me
<andlabs> I still need to figure out what the best open-source x68000 emulator to hack is
<andlabs> if I want to do the MT-32 over D-05 thing
<andlabs> since I have more of a relationship with x68000 soundtracks than with pc soundtracks, sorry sierra/lucasarts fans but I didn't grow up with pc games at all :/ apart from a handful of education games and a some board games
ej5 has quit [Read error: Connection reset by peer]
<cr1901_modern> I'm afraid I don't know
<fseidel> cr1901_modern: what's wrong with IDA?
<fseidel> genuine question, I only know it as "that disassembler everyone seems to use"
<fseidel> also, it looks like that binary file you sent is actually a compressed image
<fseidel> huh, maybe it's not??? DMS decompressor is saying it's not a DMS archive, so who knows?!
<fseidel> cr1901_modern: It's a an Amiga hunk. IRA handled it perfectly: http://aminet.net/package/dev/asm/ira
<cr1901_modern> fseidel: Oh, nothing's wrong w/ it on a technical level. I just don't want to pirate it.
<cr1901_modern> it's the principle :P
<cr1901_modern> fseidel: I don't know what an Amiga hunk is, but thank you for the help :D
<fseidel> cr1901_modern: there is a free version that hexrays gives out but I think it may be x86-only
<cr1901_modern> correct
<fseidel> and hunks are just the Amiga's executable format. It looks like this thing is actually a hunk containing a special kind of executable specifically for deliplayer: http://fileformats.archiveteam.org/wiki/Custom_Amiga_Module
<fseidel> running the hunk through IRA yields the fields described in that wiki page
<cr1901_modern> I wonder why Deliplayer reused the Hunk format...
<cr1901_modern> presumably trying to load these hunks directly on an Amiga will lead to despair?
* cr1901_modern has no idea WTF he's talking about
<fseidel> I'd guess it was probably so they could reuse the AmigaOS relocation routines
<fseidel> which would also explain why they went to the trouble of adding some dummy code at the start to make it exit if you actually try to run this thing as a normal program
Xyz_39808 has quit [Ping timeout: 264 seconds]
Xyz_39808 has joined ##yamahasynths
Xyz_39808 has quit [Ping timeout: 245 seconds]
andlabs has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Xyz_39808 has joined ##yamahasynths
andlabs has joined ##yamahasynths
andlabs has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andlabs has joined ##yamahasynths
andlabs has quit [Ping timeout: 245 seconds]
andlabs has joined ##yamahasynths
cr1901_modern has quit [Read error: Connection reset by peer]
Xyz39808 has joined ##yamahasynths
Xyz_39808 has quit [Ping timeout: 245 seconds]
futarisIRCcloud has quit [Quit: Connection closed for inactivity]