Search found 116 matches

by utz
Wed Jul 08, 2020 3:50 pm
Forum: Programming
Topic: Issues using zx7
Replies: 15
Views: 1831

Re: Issues using zx7

Difficult to say without seeing the code. Perhaps you could post it somewhere so people on here can take a look?
by utz
Wed Jul 08, 2020 3:41 pm
Forum: ZXDB Discussion
Topic: New WoS and ZXDB
Replies: 258
Views: 58580

Re: New WoS and ZXDB

+1 to what [mention]akeley[/mention] said. As has been demonstrated countless times in the past, Lee and his clique aren't interested in a rational discussion, so arguing with them is a waste of time. Other than that there's no need to defend yourself [mention]Einar Saukas[/mention], you've done mor...
by utz
Mon Jul 06, 2020 11:08 am
Forum: Programming
Topic: Help me understand the use of 'AND' here
Replies: 22
Views: 2378

Re: Help me understand the use of 'AND' here

It's especially helpful in cases like the one you were struggeling with with "and 31" and "first 8K of ROM". The decimal numbers 31 and 8191 tell you nothing. 0x1f and 0x1fff on the other hand immediately let you see that you don't need to worry about the low byte. Or take PeterJ...
by utz
Sun Jul 05, 2020 3:36 pm
Forum: Programming
Topic: Help me understand the use of 'AND' here
Replies: 22
Views: 2378

Re: Help me understand the use of 'AND' here

"8K" = 8192 bytes. So the first "8K of ROM" means an address between 0 and 8191. 8191 = %11111 11111111, or 0x1fff. We don't need to worry about the lower 8 bits, since they may take any value. The upper 8 bits on the other hand must have a value between 0 - %11111, or 0 - 0x1f, ...
by utz
Sun Jul 05, 2020 3:20 pm
Forum: Programming
Topic: Help me understand the use of 'AND' here
Replies: 22
Views: 2378

Re: Help me understand the use of 'AND' here

a) does this have bias on larger numbers (ie. if a>=31; AND 31 would always equal 31 ???)? No. A logical AND operates on individual bits. The result of ANDing two bits is 1 if and only if both of the pair of bits are 1. %00110001 (= 49 decimal) AND %00000111 (= 7 decimal) ========================= ...
by utz
Sat Jul 04, 2020 7:48 pm
Forum: Programming
Topic: Help with attributes and logical and (z80 assembler)
Replies: 19
Views: 2328

Re: Help with attributes and logical and (z80 assembler)

Thank you @utz. I will need to look at that one written down in binary so I understand! Hehe, I was thinking whether I should give an explanation, but I figured you could work it out on your own. And ideed you immediately had the right idea: Looking at the number in binary will give you the answer ...
by utz
Sat Jul 04, 2020 6:09 pm
Forum: Programming
Topic: Help with attributes and logical and (z80 assembler)
Replies: 19
Views: 2328

Re: Help with attributes and logical and (z80 assembler)

Thanks @bob_fossil You made me have a thought. I foolishly forgot that the grey is paper white without the bright. Apologies. I will look at the option you suggest, which would certainly be an improvement. So if I create a random number between 0 and 7 with and 7, then do a bit rotate 3 times would...
by utz
Sat Jul 04, 2020 4:14 pm
Forum: Programming
Topic: Suggestions on formatting of code
Replies: 56
Views: 7902

Re: Suggestions on formatting of code

A round of appreciation for Einar's z80table! Opening that up is pretty much always my first action when doing any serious Z80 coding.
by utz
Sat Jul 04, 2020 3:57 pm
Forum: Emulators
Topic: Zymosis and ZXEmuT
Replies: 20
Views: 5714

Re: Zymosis and ZXEmuT

Ha, you're a machine. Thanks a lot. I think with this setup, only minimal changes will be required on the Bintracker side, as I can send pretty much the same messages that I'm sending to MAME. Just need to write a Tcl script to decode them on ZXEmuT. That'll be fun.
by utz
Sat Jul 04, 2020 1:02 pm
Forum: Emulators
Topic: Zymosis and ZXEmuT
Replies: 20
Views: 5714

Re: Zymosis and ZXEmuT

On second thought, it actually doesn't need to work on Windows. MAME will stay the default for Spectrum emulation, with ZXEmuT being an additional option. Windows users will miss out on it then, but well, tough luck :D If you could implement calling Tcl code on hitting breakpoints, that would be awe...
by utz
Sat Jul 04, 2020 11:38 am
Forum: Emulators
Topic: Zymosis and ZXEmuT
Replies: 20
Views: 5714

Re: Zymosis and ZXEmuT

A Tcl interpreter, you say? Excellent! That should be quite workable. I'm controlling MAME through a stdio pipe. I could in theory do sockets, but it needs to work on Windows as well, so pipe is easier to do for me, I believe. One feature that would be great to have is to be able to execute code on ...
by utz
Sat Jul 04, 2020 9:42 am
Forum: Emulators
Topic: Zymosis and ZXEmuT
Replies: 20
Views: 5714

Re: Zymosis and ZXEmuT

Is it possible to control ZXEmuT through stdin? If so, I could actually use it as an alternative to MAME in my Bintracker music editor.
by utz
Fri Jul 03, 2020 10:14 am
Forum: Programming
Topic: Suggestions on formatting of code
Replies: 56
Views: 7902

Re: Suggestions on formatting of code

What a waste. That key should be remapped as a second Ctrl key, of course :mrgreen:
by utz
Thu Jul 02, 2020 9:57 pm
Forum: Programming
Topic: Suggestions on formatting of code
Replies: 56
Views: 7902

Re: Suggestions on formatting of code

So no-one indenting for loops, conditional code etc ??? it is not even always possible, considering that jumps can create a fine web. it is much easier (and cleaner, i believe) to split the code to "logical blocks" with empty lines. Exactly, it's not always possible/useful to apply best f...
by utz
Tue Jun 16, 2020 11:47 pm
Forum: Emulators
Topic: Zymosis and ZXEmuT
Replies: 20
Views: 5714

Re: Zymosis and ZXEmuT

Ah yes, I studied Zymosis quite extensively when I wrote my own z80 emulation library a few years ago. It's an excellent piece of code. Glad to see you're still working on it.
by utz
Wed May 13, 2020 11:59 am
Forum: Showcase your work!
Topic: Digital AY synth
Replies: 38
Views: 6344

Re: Digital AY synth

OK, that shouldn't be a problem. I think using LGPL may complicate things given that the Spectrum that doesn't any formal kind of dynamic linking, unless you count something like including the player as a separate block on the tape. I have changed the license to 2-clause BSD, is this acceptable? Gr...
by utz
Tue May 12, 2020 4:33 pm
Forum: Showcase your work!
Topic: Digital AY synth
Replies: 38
Views: 6344

Re: Digital AY synth

It just occured to me that I didn't voice my excitement about this yet! So: This is a fantastic project, I love it! I would actually want to support the driver in my upcoming new tracker/chiptune audio workstation . However, I have some concerns regarding the license. Generally speaking, chip music ...
by utz
Fri Apr 17, 2020 4:19 pm
Forum: ZX Spectrum Next
Topic: Games behaving differently on the Next
Replies: 263
Views: 41217

Re: Games behaving differently on the Next

* You can try to speed up the spectrum to fit the right number of Ts in one vertical frame and halt the clock during portions of the horizontal scan to match the hdmi horizontal rate. This doesn't work either as it breaks audio. Beeper sound is sh*t and ay doesn't work for sampled music or stuff th...
by utz
Tue Feb 18, 2020 9:57 am
Forum: Programming
Topic: Optimizing a Conditional (asm)
Replies: 4
Views: 942

Re: Optimizing a Conditional (asm)

Ast A. Moore: Some nice voodoo with parity there ;) But looks like it doesn't produce the desired output, unfortunately. djnzx48: Hmm, maybe I should've just posted a naïve asm implementation instead of being clever in the middle of the night. In any case, your second snippet does the right thing. S...
by utz
Mon Feb 17, 2020 11:25 pm
Forum: Programming
Topic: Optimizing a Conditional (asm)
Replies: 4
Views: 942

Optimizing a Conditional (asm)

Hi, Been twisting my head over this little assembly problem for quite some time without much progress. I have a nested conditional that I want to calculate as fast as possible and in constant time . Assuming three 8-bit integers a , b , and d , I want to calculate the following: if (abs(a - b) > d) ...
by utz
Sat Feb 01, 2020 12:04 pm
Forum: Programming
Topic: Short beeper routines in assembly
Replies: 55
Views: 32748

Re: Short beeper routines in assembly

Very kind of you wanting to credit me for this ;) Just "utz" is fine, or if you like you could throw in a link to my website, https://irrlichtproject.de.
by utz
Sun Jan 05, 2020 6:56 pm
Forum: Other Retro Stuff
Topic: Retrogaming in Germany
Replies: 16
Views: 3721

Re: Retrogaming in Germany

Besides the Computerspielemuseum, there's also the Signallabor at Humboldt University. Not sure if they have any GDR Speccy clones, but there is at least one KC85/4 ready to be used ;) It's a semi-public place, so best to make an appointment with Stefan Höltgen before visiting. He also does some the...
by utz
Fri Sep 20, 2019 10:47 pm
Forum: Programming
Topic: EX (SP),HL
Replies: 10
Views: 2972

Re: EX (SP),HL

Perhaps not so useful for most coders, but I often use 2 of them in sequence for timing purposes. Just 2 bytes for wasting 38 t-states - can't get any more bang for the buck than this on Z80.
by utz
Thu Jun 06, 2019 3:47 pm
Forum: Programming
Topic: DEVASM-Z80 - Cross Development Environment in Assembler for ZX-Spectrum based on PASMO
Replies: 32
Views: 6650

Re: DEVASM-Z80 - Cross Development Environment in Assembler for ZX-Spectrum based on PASMO

Distribution of PASMO without source is technically also illegal, since it's released under GPL.
by utz
Tue May 07, 2019 9:22 am
Forum: Programming
Topic: ChesSkelet: micro chess program - 363 Bytes
Replies: 95
Views: 15472

Re: ChesSkelet: micro chess program - 363 Bytes

Excellent write-up, I'm thoroughly enjoying this. Gears creaking quite a bit in me ol' brain, but so far I could mostly follow your explanations.