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
futarisIRCcloud has joined ##yamahasynths
Xyz39808 has joined ##yamahasynths
Xyz_39808 has quit [Ping timeout: 252 seconds]
<andlabs> maybe there's something about ix and iy that we don't know?
<andlabs> I have not evaluated z88dk's orgiinal compiler's output quality
<andlabs> shouldn't be too hard to do so though
<andlabs> also, a dedicated sound driver is different from having everything run on the Z80
<andlabs> but yeah I can't figure out how to program for msx using z88dk either, an it doesn't help that wiki page is is somewhat outdated
<andlabs> but we'll see
<andlabs> I am reading grauw's code right now
<andlabs> feels a teensy bit over-engineered to me but again, what do I know
ellester has joined ##yamahasynths
<andlabs> still doesn't tell me what the format of a COM file is, or what its memory layout is
<andlabs> probably
<andlabs> IDK
<andlabs> maybe the magical tutorials that you calim don't exist actually do exist
<andlabs> ...in japanese and spanish only
<andlabs> Relearning MSX seems good but for some reason it sticks to the pre-standard MSX-C
<andlabs> yikes
<andlabs> and not like it has a choice because I can't find any other native C compiler that isn't older
<andlabs> ; Workaround for LD A,I / LD A,R lying to us if an interrupt occurs during the
<andlabs> ; instruction. We detect this by examining if (sp - 1) was overwritten.
<andlabs> also yikes
<andlabs> "Yes, there are two dedicated index registers, and they're really useful. They're also really slow, and you can't copy values from the index registers to the register pairs or vice versa. (At least, not without using undocumented instructions.)" or push/pop, cowlark
<andlabs> oh they also did an analysis of sdcc codegen http://cowlark.com/2018-03-18-z80-arithmetic/index.html
<andlabs> anyway this and the equivlaent 6502 page shows why 8-bit CPUs and high level languages don't usually mix
<cr1901_modern> Is that because it's inherently impossible to generate efficient code for accumulator-based archs, or that no one wanted to do research on it in the 80s?
<cr1901_modern> Anyways, cowgol looks interesting but they abandoned the old portable version :/
<whitequa1k> darn, that seems worse than 8051
<cr1901_modern> (okay, admittedly "portable" in this context means "targets I care about getting a non-C HLL lang" :P
<whitequa1k> like... significantly worse
<whitequa1k> especially something like a ds80c320 derivative
<cr1901_modern> andlabs: The article does not say whether "z80 cycles" is referring to actual clock cycles or bus cycles
<cr1901_modern> 1 bus cycle = 4 clock cycles on z80
<cr1901_modern> So all those cycle values may need to be divided by 4
<cr1901_modern> to get a fair comparison w/ 6502
<cr1901_modern> where a bus cycle == 1 clock cycle
<TD-Linux> I was about to comment how the article's comments are full of z80 apologists
<TD-Linux> and then cr1901_modern rolls in with the same comment :)
<cr1901_modern> TD-Linux: I don't enjoy reading or writing z80 code at all, fwiw
<cr1901_modern> RC2014 chose the wrong 8-bit
<cr1901_modern> But if you're going to do a comparison, make it fair :P
<TD-Linux> it was the first assembly I learned due to TI calculators. which was (and still is) technically non-retro, I think
<cr1901_modern> I thought TI use 68k still
<andlabs> on the algebra calculators
<andlabs> the TI-83 used a Z80
<andlabs> if you want a 68k get a TI-93 instead
<andlabs> *TI-92
<andlabs> or Voyager 2000
<andlabs> (which is a TI-92 in the form factor of one of those palmtop translation dictionary things)
<andlabs> okay thiss appears to have everything I need to know but my head is spinning
<andlabs> and also
<andlabs> A transient program will be loaded at address 0100h, the start of the TPA (Transient Program Area), and is CALLed by MSX-DOS with the stack pointer set to the end of the TPA. If the stack pointer points to that location, as much RAM as possible can be used as the stack. If it is undesirable, then the transient program must set up its own stack in the TPA.
<andlabs> huh???
<doppler> andlabs: or, you know, an 89 :)
<andlabs> right
<andlabs> also
<andlabs> At address 0005h is a jump instruction to the start of the resident part of MSX-DOS which is used for making MSX-DOS calls. In addition the address of this jump defines the top of the TPA which the program may use. The size of the TPA depends on what cartridges are used on the MSX machine and the number of them, but is typically 53K. The low byte of the destination of this jump will always be 06h for CP/M compatibility, and the
<andlabs> six bytes immediately preceding it will contain the CP/M version number and a serial number.
<andlabs> okay
<andlabs> so uhh
<andlabs> I take it my program can be no more than.. 0500h bytes long?
<andlabs> 1.25KB?
<andlabs> or do they mean the destination is xx06h?
<andlabs> which uhh
<andlabs> ok
<andlabs> I guess I should allocate all the static memory I need up front, maybe
<andlabs> and somehow guarantee my program's important bits fit in entire 16KB chunks
<andlabs> this'll be fun
<andlabs> maybe I should write this in Z80 asm instead
<andlabs> just can't overwrite slot 3 I guess
<andlabs> if I'm reading htis right
<andlabs> this si what happens when you have more than one bankswitching method at one time
<andlabs> you have to start being as specific as possible
<andlabs> but I guess this also helps with understanding msx c programming
<andlabs> maybe
<andlabs> memory mapper functions will need to be explicitly defined
<andlabs> and I'll need to figure out how the various C compilers segment stuff
l_oliveira has quit [Quit: ChatZilla 0.9.92-rdmsoft [XULRunner 35.0.1/20150122214805]]
ellester has quit [Ping timeout: 252 seconds]
elle has joined ##yamahasynths
futarisIRCcloud has quit [Quit: Connection closed for inactivity]
superctr_ has quit [Quit: .]
superctr has joined ##yamahasynths
peach_liqueur has joined ##yamahasynths
elle has quit [Ping timeout: 256 seconds]
<cr1901_modern> Ahh peach_liqueur... there's a name I haven't seen in here in a while
peach_liqueur has quit [Ping timeout: 256 seconds]
elle has joined ##yamahasynths
elle has quit [Ping timeout: 258 seconds]
elle has joined ##yamahasynths
futarisIRCcloud has joined ##yamahasynths
peach_liqueur has joined ##yamahasynths
elle has quit [Ping timeout: 260 seconds]
emily has quit [Quit: killed]
enick_900 has joined ##yamahasynths
peach_liqueur is now known as ellester
futarisIRCcloud has quit [Quit: Connection closed for inactivity]
Patater has quit [Quit: Explodes into a thousand pieces]
futarisIRCcloud has joined ##yamahasynths
whitequa1k is now known as whitequark
Xyz39808 has quit [Ping timeout: 252 seconds]
Xyz_39808 has joined ##yamahasynths
Xyz_39808 has quit [Ping timeout: 256 seconds]
KitsuWhooa has quit [Ping timeout: 256 seconds]
Whooa21 has joined ##yamahasynths
Whooa21 is now known as KitsuWhooa
l_oliveira has joined ##yamahasynths
<andlabs> okay looking at all this again
<andlabs> uhh
<andlabs> well I now understand how to deal with the size of a com file in assembly
<andlabs> "lol you're on your own for making sure you have enough stack"
<andlabs> however I can't figure out how to arrange a C program to bank out code that's too large
<andlabs> I imagine in assembly language I have slightly more ability to do the world's clumsiest compile-time code size checks
<TD-Linux> be glad you're not on an 8 bit pic with 512 word sized banks
<l_oliveira> "16384 bytes should be enough for everyone..."
<l_oliveira> (that's one mapper segment)
elle has joined ##yamahasynths
ellester has quit [Ping timeout: 256 seconds]
peach_liqueur has joined ##yamahasynths
elle has quit [Ping timeout: 250 seconds]
<andlabs> ""Ducky One Gray / White Dye Sub PBT Mechanical Keyboard". I got mine with Cherry MX Brown keyswitches"
<andlabs> wait I thought ducky made their own swtiches?
elle has joined ##yamahasynths
peach_liqueur has quit [Ping timeout: 265 seconds]
peach_liqueur has joined ##yamahasynths
elle has quit [Ping timeout: 256 seconds]
* andlabs barks at Nerionaya
<Nerionaya> meow!!
<Nerionaya> I'm still alive I swear
<Nerionaya> never heard of Ducky making their own switches
<Nerionaya> ahhh I didn't realize you were writing it in C, C on an 8-bit machine intimidates me more than ASM somehow lol
* cr1901_modern chooses to interpret Nerionaya's meow as Dex asking for a meal in the BG
<Nerionaya> lol
<Nerionaya> a furry cat is asleep on my bed at the moment
<andlabs> I'm not even sure anymore to be honest
<andlabs> I'd write this thing faster in C that's for sure
<andlabs> since I need to simulate not one but *two* chips
<andlabs> but ehhh I might actually get it done quickly if I do it in ASM
enick_900 is now known as emily
<Nerionaya> near.... far.... wherever ram are
<cr1901_modern> far pointer... points to RAM in another room accessed via optical link
<cr1901_modern> (this actually exists)
<Nerionaya> lol
<cr1901_modern> (maybe that should be called "very far ptr")