1 (edited by bushy555 2019-04-18 12:55:09)

Topic: 1-bit on the Vtech Laser210/310 and VZ200/VZ300 Z80 computers.

Hi all,
I'm a bit of a 36 year fan of the VZ200/VZ300 computers, also known as the Vtech Laser210 and Laser 310 and a few other names around the world. When I was younger I always wanted to know if it were possible and would love to see the day that this little computer could sing anything like the ZX , or heck, anything like the C64 sid chip. For years I always wondered.
Along came Z88dk, and the closest thing was the bit_synth() and bit_fx() that the fella's created. Then in Z88dk v1.9a they released Tri-tone for the ZX in this release, but for the life of me I couldn't work out how to create a VZ library to integrate with it. However, looking at Tri-tone within Z88dk source started my search for its origin as well as other 1 bit players...

Then one day a few years ago I was doing a google, and found Utz's "how to create a 1 bit player" thread on this forum. I spent the next few weeks at work trying and trying to get either or both methods to assemble correctly and to , simply play something. And I just couldn't do it. Couldn't get anything to work.  I simply then gave up.

Only about six weeks or two months ago now something twigged inside me, and I got re-motivated again. I grabbed all of Utz and Shiru's source code for umpteen players that I could find. For both the ZX and the Ti Calculators, grabbed Beepola and 1-tracker - and quickly saw that they wrote the asm source code to each players engine along with the tune data. Wowsers, thats pretty awesome stuff right there. And then I started dabbling. First with Huby, then Poww, ZX10, Ntropic etc. Changing all of the ports OUT($FE),A to AND 33/LD ($6800),A , a few small mods for the VZ (a lot of this trial and error), and then assembing with TASM. And bugger me if I wasn't blown away when I finally got Huby to play coming out of the speakers. I was jumping for joy.  I was making history --- The first time ever , as far as I am aware of, that a 1-bit tune was playing on a VZ "something" - in this case , the "something" was a ~98% accurate emulator (VZEM) by an Aussie bloke Guy Thomason.  I then quickly shoved it on to my real VZ300. And I was *gobsmacked*. Never before such an awesome tune came out of this little device. The original manufactures in downtome Hong Kong in 1983 would not have ever known what their little Z80 @3.5Mhz could achieve something so masterful , so pure and so mesmerising to the ear.

That was perhaps a month ago now, I've since tinkered a lot more and now have 29 songs within 4 Huby "music box" programs, POWW, Ntropic, Earthshaker, LS Engine, ZX10, and the original Octode player all working - at least in the Emulator. A few timing / interrupt issues are stopping all of these engines working on real hardware, and am working on resolving these. Huby, ZX10, Octode, POWW, Ntropic and Earthshaker now all work on real hardware. Octode with its 8 channels is glorious, whilst Earthshaker sounds the most crisp and cleanest on the VZ's little piezo internal speaker.

What I am after now is a source (website or ftp) for asm sources for more songs written by proper 1-bit music artists. I am certainly not a composer, and couldn't compose a song if I had to. Does anyone know of a website where a composer has numerous songs in some of these formats?
I've had a go at searching for .bbsongs for beepola and .1tm's for 1-tracker, but there really isn't all that much floating around. I have already gone through all of ~50(?) Beepola's examples and have extracted those that sounded ok in Huby.
I guess I really need to attempt to get some of these other engines working - (....though my Z80 asm is somewhat limited when it comes to trying to read & decypher others uncommented highly-optimised listings.)

Anyway, just wanted to sing a huge shoutout to Utz and Shiru and all others that have provided these asm listings. It has given me a great new perspective on these little computers - and has given me a lot of joy in getting these players up and running over the past month.  Currently trying to get Pytha and Anteater up and running....


These youtubes were my first early attempts after I had just gotten then running on real hardware.
I should re-do them, and I now have cleaned these all up and are much better in appearance at least.
I also have a hacked piezo speaker output into my od monitor, hence why the sound is so much louder.

Octode
https://youtu.be/-nJnMcd-UVY                               

ZX10
https://youtu.be/I8Tyv0i0U8I                               

Huby
https://youtu.be/rYspaBVw0tk                               

POWW & Ntropic
https://youtu.be/59Cebnxb7Mc                               


/cheers,
Bushy.

Re: 1-bit on the Vtech Laser210/310 and VZ200/VZ300 Z80 computers.

Wow, excellent work. The Octode tune in particular I think sounds great.

Not sure if the song ripper in beepola works for huby but it certainly does for qchan, tritone and phaser 1.
Have you tried porting the qchan engine? There are masses of great tunes in battle of the bits that can be downloaded and the song file extracted. Also on chipmusic.org

Anyway, welcome aboard. It's great to hear your enthusiasm for 1-bit. Let us know of any new tunes you get running smile

Re: 1-bit on the Vtech Laser210/310 and VZ200/VZ300 Z80 computers.

Hi Bushy, welcome aboard!

Glad to see someone being so enthusiastic about 1-bit sound wink And great to have you doing all these engine ports. My first successful attempt at 1-bit code was a Huby port as well wink I'm sure after a while you'll figure out how to write your own engines as well. If you have any questions, feel free to ask, of course.

I'll see if I can dig up some .1tm files from my archive and send them your way. Unfortunately Gmail has a nasty habit of blocking attachments of unknown file types, so if you don't receive a mail from me please let me know here.

Re: 1-bit on the Vtech Laser210/310 and VZ200/VZ300 Z80 computers.

Thanks for the comments AtariTufty. This is so much fun - wish I had started dabbling in this years ago with what ever I had at the time. Think I first started with the Ti Calculator WAV player asm listing after stumbing across it years ago. I should have taken the initiative and kept looking!

Utz: thanks for the files and info. Have just replied to your email with a few listings and info on the VZ sound.

Cheers.

Re: 1-bit on the Vtech Laser210/310 and VZ200/VZ300 Z80 computers.

...four months later :

The four engines in BinTracker (Betaphase, PhaserX, PhaseSqueek and Pytha engines) took only minutes to change over and all four are now working on the VZ. The ~seven demo songs that came with Bintracker play nicely within both MESS and VZEM emulators. I have not yet had the chance to try on real hardware, however, can not see any reason why they would not work.
Unfortunately I haven't taken any video/youtube of these playing as of yet --- I will video real hardware when I get the chance.

Have made four "Huby musicbox" programs, each with around eight to ten Huby tunes, each tune selected by menu option. My limited programming methods limit the maximum program size to 32k; hence why I have four separate programs. However, having around ~38 music tunes , just off the Huby engine, is pretty cool.

Still wanting to try to convert Stocker and Q-Chan engines.

Engines now working on the VZ / Laser:
Huby
ZX10
POWW
Earthshaker
Earshaker
LSEngine
Ntropic
Pytha
Octonode
Betaphase
PhaseX
PhaseSqueek

Buzzkick : not working yet.
ZX7: Not yet working
Plipplop : not yet working

cheers

Re: 1-bit on the Vtech Laser210/310 and VZ200/VZ300 Z80 computers.

Great news, thanks for all your hard work. Looking forward to any hardware video captures smile

Re: 1-bit on the Vtech Laser210/310 and VZ200/VZ300 Z80 computers.

I will attempt to get some more tunes playing on real hardware  very shortly in the next week.
Have managed to convert quite a number of other engines over, however, some are extremely noisy because I just can't get the timing right yet.

I finally, after a number of hours and umpteen assesmbles, managed to get Tritone working very nicely with the song "Journey" that is included in the way-depths of the _Development directory in Z88DK. Sounds pretty cool.


Something like WTFX, ...and me not having the asm experience necessary, what would be the best recommendation in this instance?
The changing of all of the ZX's "OUT(C),A" to the VZ's "LD ($6800), A"   <or>  "LD [reg],$6800 / LD ( [reg] ), A"
...and then thusly fixing the timing ?   For this Frame 1 through to Frame 5?

Any pointers would be greatly appreciated.


Doh! I can't even get the bbs tag working for the screenshot.
Screenshot of WTFX asking for suggested code or pointers is here : https://imgur.com/a/RWgdHht



cheers
Dave

Re: 1-bit on the Vtech Laser210/310 and VZ200/VZ300 Z80 computers.

Hi Dave,

In general you should be able to get away with LD ($6800),A. The thing is that, because of some hardware quirks, on the Spectrum we try to align all writes to port $FE to a multiple of 8 t-states for cleaner sound. Chances are you don't have such a requirement on your machine, so you can get away with shifting the timings a bit.

There is another problem here though. The engines that use this type of "output-and-rotate" approach heavily rely on the fact that the Speccy only looks at bit 4 for the output* and ignores the other bits. So writing the value of A directly to ($6800) probably won't work. You'd need to check bit 4 of A each time and set the output accordingly, or perhaps you could look into changing the sample format so it better suits your needs. I think if you changed the sample values as follows:

$88 -> $11
$cc -> $99
$ee -> $77
$ff -> $ff

things might work out.

* that's a bit over-simplified. Bit 3 also has an impact but often that fact is simply ignored.

9 (edited by bushy555 2019-10-04 08:38:26)

Re: 1-bit on the Vtech Laser210/310 and VZ200/VZ300 Z80 computers.

Thanks heaps Utz.

Have played around with moving bits 3 & 4 to our bits 0 and 7 in WT and also changed your listed hex within all of the sample files - alas, there really wasn't any improvement unfortunately. I'm guessing I'm just missing something. I also played with shifting bits 3&4 in some of the other engines that I haven't managed to get any audio out yet; so far with little success, but I'll keep at it as I'm still currently really enthused in all of this. Whenever I find any spare time I just tinker with various ideas to no end to try to get something working.

I also did actually finally get around to start to properly count cycles for the heck of it, for the replacement LD opcode instead of ZX's OUT; trying to get the code in blocks of 8-states. Has improved sound quality in one or two engines; Still needs a lot more time spent into it, so it might be worthwhile me in doing this to all current players that I have working to reduce noise.

A few very rough grabs of a few engines playing on an Emulator are shown below. Sorry for the useless video and audio capturing, but does give a rough indication of the varying engines that I've managed to get working.


https://youtu.be/_5EdaxGSf4U            Tritone. Song: Journey.
https://youtu.be/eH4I1I7XuJo            Tritone FX
https://youtu.be/oDN6jTbStY8            PhaserX. Song:  Frohen Mohawk
https://youtu.be/aimDaYDt2FU            PhaserX. Song: Last Summer, with equaliser demo.
https://youtu.be/PE52gYiFWw4            Pytha.
https://youtu.be/ZyS1Vlr1jX0        Quadtropic with lores and hi-res equaliser.
https://youtu.be/Stm_25S97zk            Betaphase
https://youtu.be/uFYL9rsO410            VZ demo game with ZX10 engine
https://youtu.be/EQDAdN9sNFs    PhaserSqueek


Phasersqueek is the best sounding engine yet. It is just clean and crisp, and was just a cinch to convert. And I was gobsmacked upon the first running and hearing it.

PhaserX, Quadtropic, ZX and Huby seem to be the engines that can be used for games / demos without effecting performance too much. Trying to run the same code for the text equaliser in Pytha, Phasersqueek, Beta, Octonode etc just either fails from my lack of programming knowledge or the VZ simply doesn't have enough grunt to do whatever as well as the music engine.

I really want to get zbmod working; however, have already had two separate good attempts at it now, and unfortunately both were a failure.

Re: 1-bit on the Vtech Laser210/310 and VZ200/VZ300 Z80 computers.

A few hours later after posting the above, at home, reading various threads on here and I find the interesting post of the Trantor engine.
Download it, eight minutes later I have it up and running - and it sounds beautiful !

https://www.youtube.com/watch?v=faSjX_ra6q8

Re: 1-bit on the Vtech Laser210/310 and VZ200/VZ300 Z80 computers.

Another 20 minutes later, and Velvet is partially working.

http://www.youtube.com/watch?v=9Uca64kg5r4

Re: 1-bit on the Vtech Laser210/310 and VZ200/VZ300 Z80 computers.

Savage seems to be a really good quality engine. Bushy got it mostly going for the VZ but there's a high-pitched squeal in the background. Not sure how to clean that up.

Re: 1-bit on the Vtech Laser210/310 and VZ200/VZ300 Z80 computers.

A slight update:
Bushy managed to get POWW working on a real VZ300 computer. I've changed a bit of the code so you can call one part to initialize the tune and another to keep playing it with repeated calls. It means I can incorporate it in a C program loop and have the computer do other things while playing the tune.
Sadly, there's only one demo tune for POWW so I'll have to work out how to make some music in 1tracker for it and see if I can get anything good out of it.
No other 1bit engine will play on a real VZ300 at this stage.

Re: 1-bit on the Vtech Laser210/310 and VZ200/VZ300 Z80 computers.

Waulok and myself are trying to get Savage player to work correctly on our humble little real Z80 computer.
We have it working and sounding beautifully on one of our emulators, but, the real hardware doesn't want to play ball, and the current sound output it horrible.  We are essentially trying to run Savage's ZX Spectrum interrupt vectors on the VZ

Shiru : Just our of curiosity, would Savage still work and play ok, if we could simply remove all interrupt vector code, and have the stack sitting at the normal usual location?   What exact changes would be required to remove the IM2 and IM1 code?
Please be patient with me --- I'm trying to learn asm but do have a bit of difficulty in understanding some of the code when deciphering it.

Cheers.

Re: 1-bit on the Vtech Laser210/310 and VZ200/VZ300 Z80 computers.

I'm not much familiar with the Savage code, and it is super convoluted to figure it out at quick glance, but it looks like it relies to IM2 handler a lot. Simply removing it certainly won't work. The engine can be rewritten (recreated) to work without interrupts, I think, but it is more like making a new engine from scratch than a simple edit.

website - 1bit music - other music - youtube - bandcamp - patreon - twitter (latest news there)

16 (edited by WauloK 2020-01-20 05:20:40)

Re: 1-bit on the Vtech Laser210/310 and VZ200/VZ300 Z80 computers.

The VZ has a tiny piezo electric speaker so it may be more complicated to get audio out of it.
I've attached the ROM routines for creating audio from the VZ in the hope it may help.

Post's attachments

1bitaudiovz.txt 2.43 kb, 3 downloads since 2020-01-20 

You don't have the permssions to download the attachments of this post.

17 (edited by WauloK 2020-01-20 05:45:32)

Re: 1-bit on the Vtech Laser210/310 and VZ200/VZ300 Z80 computers.

A friend of mine theorises that since the ZX has a real speaker and the vz has the piezo electric one it may be that the VZ needs to run at higher frequencies to create sound when toggling the bits. Or much longer durations

Re: 1-bit on the Vtech Laser210/310 and VZ200/VZ300 Z80 computers.

LATCH_COPY is 783Bh
CONTROL_LATCH is 6800h

19

Re: 1-bit on the Vtech Laser210/310 and VZ200/VZ300 Z80 computers.

Engines using the pulse interleaving technique (Savage, Tritone, many others) most likely will not work on piezos. Pulse interleaving relies on inertia of the speaker cone, which is practically absent on piezos. So only engines using OR mixing (Squeeker, Squeeker Plus, PhaseSqueek, Squat) and maybe pin pulse engines will work.

That said, VZ also has tape out, right? I'd focus on using that for sound instead of the piezo.

20 (edited by bushy555 2020-01-20 23:41:15)

Re: 1-bit on the Vtech Laser210/310 and VZ200/VZ300 Z80 computers.

utz wrote:

Engines using the pulse interleaving technique (Savage, Tritone, many others) most likely will not work on piezos. Pulse interleaving relies on inertia of the speaker cone, which is practically absent on piezos. So only engines using OR mixing (Squeeker, Squeeker Plus, PhaseSqueek, Squat) and maybe pin pulse engines will work.

We've managed to get horrible noises coming out of the piezo using Savage and Tritone; but that now makes a lot more sense. We can perhaps put out efforts towards PhaseSqueek.  Must admit though, Squat is one of the very few that I have not yet looked at at all.


utz wrote:

That said, VZ also has tape out, right? I'd focus on using that for sound instead of the piezo.

Gave it a go with Huby and Octode - dead-set simple to simply change the bits and after plugging in an amplified speaker separated by two 0.1uf ceramic caps,  it worked brilliantly; outputting straight to the cassette port.

We're just not too sure that our VZ audience will want to be mucking around wanting to , or needing to plug in stuff. Sure, it could be their loss, but.... since we do have a piezo I think our aim is to attempt to utilise it the best we can. And as well to attempt to (1) go well beyond the level that the computer was designed for and (2) blow the minds of those that have never heard of such beaut audio coming out of the humble little computer.   Heh! Or something like that...

Waulok : ...about right isn't?

Happy new year by the way.
Cheers.

Re: 1-bit on the Vtech Laser210/310 and VZ200/VZ300 Z80 computers.

Yeah

Seems the most important code to make sound:

LD A,($783B)
LD D,A
XOR $21
LD ($6800),A
LD A,D
LD ($6800),A

Re: 1-bit on the Vtech Laser210/310 and VZ200/VZ300 Z80 computers.

I've been recently looking at QChan. Dunno if that's doable or what methods it uses.

23

Re: 1-bit on the Vtech Laser210/310 and VZ200/VZ300 Z80 computers.

Qchan is pin pulse so in theory it should work. However, it may be too quiet to be properly audible, or maybe the pulses will be too short to actually switch the piezo. Could also be that the volume envelopes don't quite work as intended because some piezos have a pretty strong overshoot. Nevertheless, it's worth a try methinks. Same goes for the Octode family (except Octode PWM and Octode2k16, those are pulse interleaving), Stocker, Huby, and BuzzKick.

Re: 1-bit on the Vtech Laser210/310 and VZ200/VZ300 Z80 computers.

Thanks again smile

Re: 1-bit on the Vtech Laser210/310 and VZ200/VZ300 Z80 computers.

For anyone else reading this thread, here is a quick vid I did back in January with a few engines running from real hardware.
Please ignore / excuse the quality of the video.

https://www.youtube.com/watch?v=bHmQyP6IU84

Haven't really looked at 1-bit since then. Still have many many ideas and plans floating in my head of things to do and try.