Search found 6 matches

by voidstar
Sat Jun 05, 2021 9:50 am
Forum: Other targets
Topic: TRS80 model 3 sound
Replies: 8
Views: 4958

Re: TRS80 model 3 sound

Yes, I considered that - except then it's harder to know the offset of where to POKE to adjust the H/L register values (and obviously you don't want the overhead of passing an argument). Some C compilers have the &&label option ("address of a label") but I don't think that worked f...
by voidstar
Thu Jun 03, 2021 5:28 am
Forum: Bug reports
Topic: possible signed vs unsigned issue
Replies: 1
Views: 3966

possible signed vs unsigned issue

I'm sure this is an error on my part or some misunderstanding about K&R C ...... I was passing a constant -20 to a function, where the 2nd parameter is signed char. I evaluated that signed char with "< 1" (less than 1). void initialize_challenges(unsigned char index, signed char initia...
by voidstar
Thu Jun 03, 2021 4:26 am
Forum: Other targets
Topic: TRS80 zcc optimization
Replies: 2
Views: 2529

TRS80 zcc optimization

I'm targeting a TRS80 (model 3). The code is compiling and running - now I'd like to explore optimization options. I understand zcc is a front-end that is doing a lot of things for me behind the scenes - but I'm little lost on what all that is (z88dk-z80asm.exe and zsdcc.exe?) and why I need -create...
by voidstar
Thu Jun 03, 2021 2:42 am
Forum: Other targets
Topic: TRS80 model 3 sound
Replies: 8
Views: 4958

Re: TRS80 model 3 sound

Oh - I'm not using any of the standard library and didn't notice the sound.h in the include folder :) I do recall a note that z88dk does include quite a bit of extra stuff in its library, although I wasn't sure how much of it applied to the TRS80. So now I tried those sound folder samples - I'm not ...
by voidstar
Wed Jun 02, 2021 10:03 am
Forum: Other targets
Topic: TRS80 model 3 sound
Replies: 8
Views: 4958

Re: TRS80 model 3 sound

I was able to make it work in cc65 with the sample below. I looked into USR(ARGS), disassembled that, which seems to be: load what is in 4121h into HL... // e7 rst 0x20 // 2a2141 ld hl,(0x4121) == 16673 dec (load content at 0x4121 into HL) // f8 ret m But I made the adjustment to by-pass all that, a...
by voidstar
Wed Jun 02, 2021 12:38 am
Forum: Other targets
Topic: TRS80 model 3 sound
Replies: 8
Views: 4958

TRS80 model 3 sound

Greetings, I'm trying to do sound on a TRS-80, like in the game Eliminator for that platform. I figured out sound for the Commodore and Apple, but I'm not seeing any notes for the TRS-80. There are some manuals about TRS-80 BASIC that referenced a BEEP and SOUND command. But in the trs80gp.exe emula...