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
andlabs has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andlabs has joined ##yamahasynths
<andlabs> Foone: alpha/biden/obama
<whitequark> no
<whitequark> just no
<Foone> I'm sorry.
<Foone> in fairness I do, in fact, have a medically diagnosed illness right now so my brain is barely working
<cr1901_modern> I'm very sorry I looked that tweet thread up now
* cr1901_modern is trying to think of his favorite malapropism
<cr1901_modern> protosphere: While it's on my mind, you did a TSR for controlling a ProAudio Spectrum ages ago, right?
<andlabs> >:3
<andlabs> you can thank devin/notrevenant for sharing it with me
<andlabs> there was some group of males that got all the rage for alpha/beta/omega fanslashfic a few years ago but I cannot remember what it was
* ej5 can hardly wait for the Plaid Bib fabs to get in.
<protosphere> cr1901_modern: I did!
<protosphere> I think it has bugs
<andlabs> protosphere: what is that avatar?
<protosphere> Ah, it is a pixel thing I drew ages ago
<protosphere> It is changed now, doing some cleanup
l_oliveira has quit [Quit: ChatZilla 0.9.92-rdmsoft [XULRunner 35.0.1/20150122214805]]
<andlabs> I meant what you changed it to =P
<andlabs> I'm going to bed though so highlight me with answer
<cr1901_modern> protosphere: >It interfaces via the MVSOUND.SYS driver and hence requires it to be installed prior to use.
<cr1901_modern> Ahhh, not what I was looking for, but ty for reuploading the source :P
<cr1901_modern> I couldn't remember the details
<cr1901_modern> ej5: How confident you think it'll work w/o a respin :)?
<ej5> hard to say
<ej5> there's a pretty good chance it'll work in my model 50
<ej5> but i need to engineer some changes so it'll work in faster ps/2 machines, like the model 80
<cr1901_modern> like wait states :P
<ej5> ultimately i'd like to replace the bus interface chip with a cpld
<cr1901_modern> I would love to see that (or an FPGA impl, since I'm more familiar w/ those)
<cr1901_modern> 5V-tolerant CPLDs are still made (Xilinx 9500 series), but I'm paranoid they will become NRND soon (and then EOL), if not already.
<protosphere> cr1901_modern: I want to RE the MVSOUND driver at some stage but my main DOS machine is out of action atm
<protosphere> I imagine it’s quite simple though
<cr1901_modern> Might be a good Ghidra or 8088 binja smoke test. I don't have a PAS. I just remembered it existed this evening and vaguely remembered you doing a TSR for it
<protosphere> You need to load it for the normal PAS utils so I figure it was less effort just to make use of it since it was already documented
<cr1901_modern> It had TWO OPL2 chips :o
<cr1901_modern> For twice the FM synth power
<protosphere> I think that’s the PAS, I have a PAS16
<protosphere> Which is just OPL3
<protosphere> My DOS machine has some garbage PCChips motherboard too, I need to find something nicer
<protosphere> but socket 7 mobos on eBay aren’t cheap
<cr1901_modern> You bought the NuXT, right?
<protosphere> Oh no I didn’t buy it
<protosphere> And it got covered by uh
<protosphere> LGR
<protosphere> so it’s now way out of stock
* cr1901_modern sighs heavily
<cr1901_modern> Of course
<cr1901_modern> Not that I was going to pay $300 for one at this juncture
<protosphere> Yeah that’s a bit steep for my budget
<protosphere> Especially for an XT class machine
<protosphere> But understandably priced for a custom PCB of that size
<cr1901_modern> Idk of many good FPGA impls of PC hardware either. Kinda understandable, since even 8088 is a bit of a clusterf***
<protosphere> PAS16 has a weird hanging midi notes bug though
<protosphere> At least under win98
<cr1901_modern> Oh it was supported that long?
<protosphere> Not sure about DOS
<protosphere> re: ghidra, it needed a little bit of help last time I tried doing 8086 things with it
<protosphere> Had to mark code sections manually
<cr1901_modern> Try binja then if you can afford the hobbyist license
<cr1901_modern> I can live w/ marking code sections manually tho, tbh
<protosphere> It was completely workable for my situation
<protosphere> I figured out what I needed to
<protosphere> (that was the jb3000 stuff)
<cr1901_modern> b/c I have stockholm syndrome from trying to script ndisasm (which is a dumb assembler)
<cr1901_modern> jb3000?
<protosphere> The jb3000 has an almost-ISA expansion interface, I kinda want to modify that Adlib clone to work on it
<protosphere> Uh some very rare 8086 pc-like machine
<protosphere> I somehow ended up with one
<protosphere> Yeah that’s the machine I own
<protosphere> That post is the original owner I got it from
<protosphere> Someone working on MAME reached out to the original owner for ROM dumps and that’s how I ended up with it
<protosphere> since it’s one of the very few machines with the 8-inch controller card I ended up reversing that and adding support in MAME
<cr1901_modern> I have some vague recollection that the stock version of MSDOS/PCDOS you'd use on the IBM PC deals w/ 8in floppies pretty poorly
<cr1901_modern> like it's not straightforward to get MSDOS to actually use them properly
<protosphere> On this it’s fine (DOS 1.25)
<protosphere> But it’s custom for this particular machine
<protosphere> Except for SD disks it tries to dump the entire 512 byte boot sector in the 128 byte sector on the floppy
<protosphere> So you can only boot DD floppies with 1024 byte sectors, not SD
<protosphere> but they work fine for storing whatever else
<cr1901_modern> makes sense... idk if MSDOS uses int 13h internally for floppy access or it programs the disk controller with its own parameters (overriding the BIOS)
<protosphere> It has its own routines
<protosphere> At least in 1.25, the source is available
<cr1901_modern> indeed, but why would I look it up when I can ask someone to do it for me ;) (thanks)?
<protosphere> I ended up knowing the internals of IO.SYS more than I’d like from that project
<cr1901_modern> I don't run anything lower than 2.x on my machines... 1 is too limited. I wish the source to 3.x was avail because internal data structures stopped changing after that version. It would help me debug some problems on later machines that I own.
<protosphere> DOS 2 would be good, but I need some way to actually get data into that machine first
<protosphere> Can’t exactly just write an 8-inch floppy
<cr1901_modern> indeed
<protosphere> It has a nonstandard drive interface too
<protosphere> which is completely undocumented
<cr1901_modern> I really wish I could remember how/why I concluded 8" drives don't play nice with the IBM PC on MSDOS... it feels like it should work
<cr1901_modern> Also why does your machine completely screw up SD disks if you know?
<cr1901_modern> Like why does it try to use a 512 byte bootsector on an 128 byte sector floppy?
<protosphere> Yes
<protosphere> Oh why
<protosphere> It uses a 512 byte one on the 1024 sector disks too
<protosphere> Presumably just a side effect from porting PC DOS
<protosphere> which used 512 byte sectors
<protosphere> 1024 byte sector*
<cr1901_modern> Presumably what happens is the disk controller tries to read 128 bytes, then encounters a CRC error b/c 512 data bytes were written?
<protosphere> It’s just truncated on the disk
<protosphere> The next sector is usable
<protosphere> the sector size is set correctly in DOS for raw read/write
<cr1901_modern> confirmed via RE :P?
<protosphere> I know via RE that DOS uses the correct sector size yes, the rest is just an educated guess
<protosphere> I know it reads fine because I’ve dumped the disks
<cr1901_modern> well, it's cool to get your confirmation b/c it helps address misconceptions I've had about how DOS and floppies work
<cr1901_modern> (2:37:48 AM) protosphere: 1024 byte sector* <-- PC floppies use 512 byte sectors traditionally... I _think_?
<cr1901_modern> Why can't I remember this stuff anymore?!
<protosphere> I meant “1024 sector” -> “1024 byte sector” in my earlier message sorry
<cr1901_modern> ahhh whoops
<cr1901_modern> Not that DOS is known for it's wonderful error handling, but that seems like a pretty bad assumption for early DOS to make about sector size... it should've had multiple versions of the boot sector depending on sector size
<cr1901_modern> protosphere: https://en.wikipedia.org/wiki/Tandy_2000#cite_ref-10 the jb3000 is notably absent from this table :(
<protosphere> Oh, it’s not PC compatible, just same sort of market
<protosphere> More just like an 8086 machine that also runs MS-DOS
<protosphere> I think they advertised it being sort-of compatible
<protosphere> i.e. basic applications that use MS DOS API only
<protosphere> I suppose it could belong in that list
<ZirconiumX> https://lore.kernel.org/linux-mips/cover.1567326213.git.noring@nocrew.org/T/ <--- So somebody posted patches to run mainline Linux on a PlayStation 2.
<ZirconiumX> Does this count as sufficiently absurd for this channel?
<Sarayan> only if you compile and run pcsx2 on it afterwards
<ZirconiumX> That would be pretty cripplingly slow, but funny
<Sarayan> yeah
<cr1901_modern> Wait, PSX uses MIPS I with the LOAD delay slots?!?! https://github.com/simias/psx-sdk-rs/issues/1
<protosphere> yes
<protosphere> and branch delay
<protosphere> it's a little annoying
<cr1901_modern> Wasn't MIPS I like TEN years old by the time PSX came out
<cr1901_modern> also that really kinda stinks for the repo I linked
<protosphere> apparently r3000 is 1988
<protosphere> not quite ten years, but a little old by that time
<protosphere> llvm's mips target doesn't support load delay slots, does it?
<protosphere> i remember looking into that at some stage
<cr1901_modern> No, which is the link I mentioned
<protosphere> ah
<protosphere> in the end i just ended up writing the little thing i needed in assembly rather than trying to cross-compile gcc
<cr1901_modern> Do you know any good MIPS assemblers (oxymoron that might be)?
<protosphere> i just used mipsel-binutils
<protosphere> worked for what i was doing
<protosphere> there's some assemblers from playstation demoscene groups otherwise
<protosphere> for MIPS-I at least
<ZirconiumX> cr1901_modern: Depends how authentic you want to be; the console technically has its own executable format
<ZirconiumX> The PS-X EXE
<ZirconiumX> (which was how it got its name as the PSX)
<cr1901_modern> I don't care about authenticity, I just (hypothetically) care about not hating myself when writing said MIPS code
<ZirconiumX> Definitely binutils then
<ZirconiumX> Especially with .set reorder
<cr1901_modern> That should be fairly easy to build if/when I need it too
<cr1901_modern> Anyways, it was just a curiosity that I didn't know
<cr1901_modern> http://gdri.smspower.org/wiki/index.php/Mega_Drive/Genesis_Sound_Engine_List Going back to sleep for a bit, but for those familiar w/ sound drivers... what does it mean for SMPS to be "banked"?
<ZirconiumX> The LLVM assembler for MIPS is really nice, but there's no MIPS I support
<ValleyBell> cr1901_modern: "banked" means, that there are multiple "sound banks" that contain a certain amount of music and a copy of all FM instruments, PSG envelopes and other stuff
<ValleyBell> Basically - non-banked: contains exactly 1 copy of PSG envelopes and 1 list of song pointers
<ValleyBell> banked: 2 or more banks that have a separate list of song pointers and their own copy of PSG envelopes (which are usually to the SMPS sound driver)
<ValleyBell> So when wanting to play a certain song in a non-banked driver, just sending the song ID is enough.
<ValleyBell> In a "banked" driver, you need to set the proper sound bank first and then send the song ID.
<ValleyBell> i.e. "bank 1, song 4" or "bank 2, song 1"
<ValleyBell> This is pretty common for SMPS Z80 drivers.
<ValleyBell> (There is one "banked" SMPS 68k driver that uses 2 copies of the whole sound driver in order to have a cheap way of allowing more than 31 songs.)
<cr1901_modern> What's special about 31 songs?
<cr1901_modern> Is it a driver limitation or hardware limitation
<cr1901_modern> ValleyBell: And why would you bother with two levels of indirection in practice? What's the advantage of doing, e.g. "bank 2, song 1" vs "song 32", where the latter only requires one indirection and seems simpler
<ValleyBell> By default, SMPS uses the following ID layout: 00..7F: driver reset, 80 - do nothing, 81..9F - songs, A0..DF - sound effects, E0..FF - special commands (stop music, stop SFX, fade out music, ...)
<ValleyBell> In case of the banked SMPS 68k game, I assume they just went the lazy way, because they didn't want to touch the sound driver's internals.
<ValleyBell> For SMPS Z80, the sound driver can access the ROM only in blocks of 32 KB.
<ValleyBell> So in order to have more than 32 KB of data for music + SFX, just having multiple banks (with some redundant data) is quite practical.
<ValleyBell> The Z80 has 8 KB of RAM and in case of SMPS, 4 KB are sound code, 1 KB is work RAM.
<ValleyBell> The remaining 3 KB were often used for SFX in earlier SMPS Z80 variants.
<ValleyBell> Vibrato and volume envelope table were usually stored in the banks that also contain the music.
<andlabs> some Z80 drivers also copied the music FM voice selection into RAM
<andlabs> $D517 is a number that'll be etched into my head =p
<ValleyBell> only like ... 2 or 3?
<andlabs> but yeah there was just not enough RAM
<ValleyBell> Sonic 3/K/3D is the popular example.
<andlabs> (it should be $17D5 but lol little endian)
<ValleyBell> also .. wasn't it's $17D8?
<andlabs> whatever it was
<andlabs> the best part of Sega's Z80 design was that there's 8KB of unused space in the memory map
<andlabs> just... not used at all
<ValleyBell> Dyna Brothers 1/2 had the FM instruments at the beginning of each song bank.
<andlabs> Sega basically mapped the Z80 memory into 8KB chunks
<andlabs> so initially the PSG was not mapped into Z80 memory at all; Space Harrier II and Super Thunder Blade botha ccess it through the ROM bank area
<ValleyBell> yeah
<andlabs> but they decided that was bad so they mapped the VDP into the Z80 memory map
<andlabs> ...but NOT in that unused 8KB area
<ValleyBell> They probably just reused the 8KB block mapping from the SMS.
<andlabs> nope, instead they chopped off the tail end of the 8KB used for the ROM bank select pin
<andlabs> sega is weird like that
<andlabs> and yes, the ROM bank select *pin*
<andlabs> 8KB entirely for one single serial bit in a barrel-roll register
<ValleyBell> which is why you have to do 9 single writes to set the ROM bank
<andlabs> the Mega Drive is a system designed in 1988 for 1988
<andlabs> interviews with the deisgners claim the system was going to be a gazillion times more ambitious
<andlabs> I don't buy it
<andlabs> they should have just made the Teradrive the console
<andlabs> and attached it to a PC98 instead of a IBM PC
<andlabs> or standalone
<andlabs> it wouldn't have been better sound-wise but it would have slightly more edge
<andlabs> they would have also needed the System C's palette generator and either its uPD7759 or the Sega CD's Ricoh chip
<andlabs> the FM Towns had the latter!
<andlabs> (the FM Towns was the other major user of the YM2612)
<andlabs> (and apparently its documentation on how to use the chip is a lot better than sega's)
<andlabs> most of Compile's games on the MD store color data in R5G6B5 and convert it to R3G3B3 on the fly; I forget if that's how the colors are stored on the System C or not but hey you can see what they wanted their art to look like
<andlabs> the System C exploits a feature of the VDP where color data can come from an external source
<andlabs> you're still imited to 64 colors, but the scroll planes and sprites can have entirely separate sets of 64 colors
<andlabs> and the colors are not limited to the 512 of the internal CRAM
<andlabs> color values themsleves, I mean
Xyz_39808 has quit [Ping timeout: 250 seconds]
Xyz_39808 has joined ##yamahasynths
<andlabs> arg3 & arg2 | ~arg2 & current
<andlabs> (arg3 & arg2) | (~arg2 & current)
<andlabs> ok
<cr1901_modern> Teradrive is a fascinating beast. I want one but probably never will get one.