[HN Gopher] Getting into way too much detail with the Z80 netlis...
       ___________________________________________________________________
        
       Getting into way too much detail with the Z80 netlist simulation
       (2021)
        
       Author : userbinator
       Score  : 73 points
       Date   : 2024-04-14 08:23 UTC (14 hours ago)
        
 (HTM) web link (floooh.github.io)
 (TXT) w3m dump (floooh.github.io)
        
       | flohofwoe wrote:
       | Author here, interesting to see this posted since it's more like
       | a reference manual for Z80 instructions with 'unusual' timings,
       | mostly useful for emulator coders. The followup blog post about
       | the cycle-stepped Z80 emulator is probably more interesting:
       | 
       | https://floooh.github.io/2021/12/17/cycle-stepped-z80.html
       | 
       | One important note: at the start of the post I'm speculating
       | about why I was seeing some minor differences to a 'real' Z80, it
       | turned out that this speculation was wrong and instead the
       | differences were caused by 'incomplete' netlist simulation code
       | which worked fine for the 6502 but required some tweaks for the
       | Z80, see the comments of this GH issue for details:
       | https://github.com/floooh/v6502r/issues/2.
       | 
       | As far as I'm aware the netlist simulation now behaves correctly
       | like a Zilog Z80 (but note that some reverse engineered Z80
       | clones like the East German U880 are known to have slightly
       | different undocumented behaviour - which barely matters in
       | practice though). The Z80 and 6502 emulators in
       | https://github.com/floooh/chips are tested against their
       | respective netlist simulations for correct behaviour and timing
       | (all being based on the netlists from http://www.visual6502.org/
       | and the simulation code from
       | https://github.com/mist64/perfect6502 - which is the simulation
       | from visual6502.org ported from JS to C).
        
         | userbinator wrote:
         | _and instead the differences were caused by 'incomplete'
         | netlist simulation code which worked fine for the 6502 but
         | required some tweaks for the Z80_
         | 
         | That was very interesting to read. This is a nearly 50-year-old
         | CPU, and yet many people are still discovering things about how
         | it works in detail; or perhaps more precisely, discovering
         | edge-cases in simulation and fixing the latter to more closely
         | correspond with the actual physical processes it models.
        
       | bernds74 wrote:
       | I'm interested, but... could I convince you to change the font
       | and the colours into something that makes the site readable? Very
       | thin font, light on dark, very little contrast is about the worst
       | case for readability.
        
         | flohofwoe wrote:
         | What browser and operating system are you on? Unfortunately
         | font rendering seems to differ vastly between browsers. Note
         | taken about the color palette though (I _did_ try a brighter
         | font color but found it too painful on my eyes).
         | 
         | PS: Firefox's and Chrome's reading mode is probably the best
         | quick workaround. When opening a post in Firefox, I get a
         | Reading Mode button in the navbar, and for Chrome it's in the
         | new sidepanel.
        
           | bernds74 wrote:
           | I first opened it in Firefox on Linux. I think whatever
           | subpixel rendering it's trying to do doesn't work with light
           | fonts on dark background, there is blurriness and colour
           | fringes. It seems to look a little better in Chromium. Just
           | adding some weight to the font would already help.
           | 
           | Another thing that's hurting readability is monospace.
        
           | actionfromafar wrote:
           | Firefox reader does not work on iOS.
        
             | mburns wrote:
             | It does, actually.
        
           | peterfirefly wrote:
           | Chrome + Windows 11. And before that Chromium on various
           | versions of Ubuntu Linux over the years. Firefox renders it
           | practically identical to Chrome/Chromium.
           | 
           | I stayed for the content but the colors and the thin
           | monospaced font didn't make it a pleasure. I have returned
           | regularly over the years because I like the content so much.
           | 
           | > I did try a brighter font color but found it too painful on
           | my eyes
           | 
           | Do you have retinal detachment? It can cause high contrast to
           | be unpleasant to the point of being painful.
        
         | dang wrote:
         | We detached this subthread from
         | https://news.ycombinator.com/item?id=40030247.
        
       | grzeshru wrote:
       | Question for the author: throwing this out there, do you know if
       | anyone has written a Rabbit RCM2000 emulator by any chance?
        
         | flohofwoe wrote:
         | Don't know :) So far I only cared about 8-bit computer systems
         | from the 80's (specifically Z80 and 6502 based systems).
        
           | xioxox wrote:
           | Very nice site. Have you considered an Amstrad PCW emulator?
        
       | antirez wrote:
       | Make sure to check the other works of floooh (Andre) as well. I'm
       | porting his ZX Spectrum emulator to the RP2040 these days, and
       | working with his code is amazing: it's clean, precise, never more
       | complicated than needed, with a deep care to even the smallest
       | details.
        
       | RetroTechie wrote:
       | Interesting that NMIs can be postponed by long sequences of DD/FD
       | prefixes - so potentially for 1000s of clock cycles.
       | 
       | Strictly speaking that undoes the "N" in "Non-Maskable
       | Interrupts".
        
         | userbinator wrote:
         | I believe the 8086/8 has the same behaviour with its prefixes
         | too.
        
       ___________________________________________________________________
       (page generated 2024-04-14 23:00 UTC)