Welcome, Guest. Please login or register.


Author Topic: DAVE: which polynomials, how high-pass filtering and modulation are implemented? (Read 6131 times)

Offline TomH

  • Newbie
  • Posts: 23
Apologies; the subject line has a character limit to ensure brevity — I hope that doesn't come across as aggressive.

So I'm limbering up to write an emulator, after a few years of casually reading documentation from time to time, with Enterprise.iko.hu being the best source that I've yet found. But the published information on DAVE in particular seems to lack some detail so I was curious as to whether the community has filled in the blanks?

In particular there are quite a few references to polynomial counters, both for distortion and for noise generation, including mentions of 4-, 5-, 7-, 9-, 11-, 15- and 17-bit counters. Has anyone ever determined which polynomials are in use? Even at 17-bit it looks like there are only 7,710 possible polynomials that give the full 2^17 - 1 range, so it feels like if you had a sample from the original machine you could do a brute-force search?

There's also the high-pass filter (and, for noise, a low-pass) and the ring modulator. Is anything known about the on-chip implementation of those? E.g. the SID performs ring modulation by a simple MSB substitution, is there any known similar smoke-and-mirrors stuff going on here?

If these things are currently unknown then fair enough; sorry for the barrage.

Offline ergoGnomik

  • EP addict
  • *
  • Posts: 1291
  • Country: hu
  • Stray cat from Commodore alley
The author of ep128emu investigated and implemented all these and more. You may want to study the sources of his programme.

Offline TomH

  • Newbie
  • Posts: 23
The author of ep128emu investigated and implemented all these and more. You may want to study the sources of his programme.

There's a potential ethical issue there in that my emulator is MIT licensed, which is more permissive than his GPL 2.0, but luckily his coding style looks so distinct from my own that there's no risk of code theft. So I guess that if there's no other documentation, then it's the way to proceed.

Knee-jerk observation: most of the polynomials listed don't actually look maximal in terms of states. Which is interesting, at least.

Offline geco

  • EP addict
  • *
  • Posts: 7082
  • Country: hu
    • Támogató Támogató
I think there is no better source for a lot of things than ep128emu, if i know well Istvan tested the undocumented stuff on real hw and based on the tests made the emulation.

Offline TomH

  • Newbie
  • Posts: 23
In that case helpful task #1 might be if I transcribed what Ep128 seems already to know. Ideally into wiki.enterpriseforever.com but since that seems to be closed to new accounts then I guess elsewhere in the interim.

Offline ergoGnomik

  • EP addict
  • *
  • Posts: 1291
  • Country: hu
  • Stray cat from Commodore alley
Another option would be deciphering the schematic drawings.

Offline TomH

  • Newbie
  • Posts: 23
Another option would be deciphering the schematic drawings.

Cool, thanks! I'm a very slow reader of those things, but at least not illiterate.

Otherwise, for now I'm accumulating my notes on my wiki but there's nothing there yet that doesn't come from existing scanned documentation. I also transcribed the Nick documentation that seemed to have the broadest scope here for easy future text searching; it's a reproduction of NICK-Old-VDC-ELITE-description.pdf from Enterprise.iko.hu. That might or might not be helpful to somebody else one day.

So thanks to all, I've definitely enough to press on. And to be explicit: I know full-well that nobody needs an additional emulator, it's just a fun hobby.

Offline gflorez

  • EP addict
  • *
  • Posts: 3607
  • Country: es
    • Támogató Támogató
And to be explicit: I know full-well that nobody needs an additional emulator, it's just a fun hobby.

Of course, we all are in this for fun.

For example, LGB(a genius member of this web) has made some good Enterprise emulators, mainly light versions to test some new feature. At the end the valuable information has been always included in the EP128emu by Istvan Varga.

It is not a matter of a fight between emulators, but to add and complete the information we have about the hardware.

Online Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14722
  • Country: hu
    • http://enterprise.iko.hu/
IstvánV (author of ep128emu) wrote so much about undocumented properties of Dave in the Hungarian forum.
These are collected and added to here as addendum ("Néhány kiegészítés a DAVE dokumentációjához").
Sorry it is in Hungarian, try with Chrome/Google translate :oops:
« Last Edit: 2021.June.16. 18:56:30 by szipucsu »

Offline TomH

  • Newbie
  • Posts: 23
It is not a matter of a fight between emulators, but to add and complete the information we have about the hardware.

Oh, absolutely. I doubt I'm going to bring much to the table to be honest — other than perhaps providing a maintained, native-UI macOS option. If anything that might even take some other functionality off the table, since I actually quite like the sandbox as a user and therefore tolerate it as a developer, though e.g. it means not exposing the local filing system to the emulated Enterprise.

IstvánV (author of ep128emu) wrote so much about undocumented properties of Dave in the Hungarian forum.
These are collected and added to here as addendum ("Néhány kiegészítés a DAVE dokumentációjához").
Sorry it is in Hungarian, try with Chrome/Google translate :oops:

Wow, that hopefully means that I don't even need to go Ep128Emu source diving when relevant questions arise!

I ran it through an automatic translator and captured the resulting HTML here if anybody wants to skip a step. Luckily the output is still relatively clean. I guess I'll apply manual copy edits when I get a chance to inspect in detail, and then try to find somewhere to host the translation more permanently.

Right now I'm still implementing Nick, and already running up against a few queries, mostly to do with continuity between lines, especially when switching between vsync and any non-vsync mode — e.g. if you've set the left border for after the right on a pixel line that rolls into a vsync line, does the line begin in the outputting-vsync state rather than outputting blank? Luckily my CRT emulation seems to be able to sync lock even to my current naive implementation so I'm at least at the point of having stable output for sufficiently conventional line parameters, though it's fairly permissive with regards to vertical sync.

Anyway, I won't bore with the development-blog-level commentary.

Thanks to all for the assistance so far!

Offline dangerman

  • EP fan
  • *
  • Posts: 100
Hello! This sounds like a great fun project.

I also transcribed the Nick documentation that seemed to have the broadest scope here for easy future text searching; it's a reproduction of NICK-Old-VDC-ELITE-description.pdf from Enterprise.iko.hu.
FYI I expect you know already, but that documentation is pre-production, so may be slightly different to reality. For example, I seem to recall that the /VRES bit only affects LD1 and not LD2. Contrary to the description, it's possible to have ATTRIBUTE mode with different attributes per scanline (depends on /VRES).

Offline szipucsu

  • Global Moderator
  • EP addict
  • *
  • Posts: 9898
  • Country: hu
    • Támogató Támogató
    • Webnyelv.hu - Tanuljunk nyelveket!
100 SOUND SOURCE 2,STYLE 128,PITCH 25.2,SYNC 1
110 SOUND PITCH 25,SYNC 1
120 ! Videos

Offline TomH

  • Newbie
  • Posts: 23
Knee-jerk observation: most of the polynomials listed don't actually look maximal in terms of states. Which is interesting, at least.

I withdraw this comment; there's two ways around you can implement these things — shifting left or shifting right — and I misunderstood which is being used. The automatic translation of IstvánV's comments has clarified my muddled reasoning.

To record them here, if you're talking in terms of LFSR polynomials written down in the same same form as those given at this resource then IstvánV lists:
  • 0xc
  • 0x14
  • 0x60
  • 0x110
  • 0x500
  • 0x6000
  • 0x12000

All of which are on the maximal-length polynomial lists as linked.

Audio is the next thing I have to implement, so my gratitude towards IstvánV is about to multiply by a thousand.

Offline szipucsu

  • Global Moderator
  • EP addict
  • *
  • Posts: 9898
  • Country: hu
    • Támogató Támogató
    • Webnyelv.hu - Tanuljunk nyelveket!
As I know, ring modulation can be implemented by logical gates, as for the square waves.
100 SOUND SOURCE 2,STYLE 128,PITCH 25.2,SYNC 1
110 SOUND PITCH 25,SYNC 1
120 ! Videos