home.social

Search

514 results for “db0”

  1. ミクちゃんおめでとう! / kanasa / August 31, 2024 8:04:00 PM JST
    初音ミクちゃん、お誕生日おめでとう!!
    これからも、ずっとずっと大好きです♡
    #ボカロ #初音ミク生誕祭2024 #VOCALOID #初音ミク
    https://www.pixiv.net/en/artworks/122008283
    https://www.pixiv.net/en/users/91481278
  2. Vor 3 Jahren wurde das #Sachsenbad gegen den Willen des Bürgerforums verkauft - diesen Sommer müsste ein Bauantrag eingereicht werden, sonst kann die Stadt vom Verkauf zurücktreten. Doch hinter den Kulissen wird angeblich neu verhandelt. Unser neu gewählter #Stadtbezirksbeirat @jhdd will sich das nicht bieten lassen und verlangt nach #Informationsfreiheitssatzung Einsicht in die Unterlagen. Wir kämpfen weiter: Wasser zurück ins Sachsenbad!

    piraten-dresden.de/wir-fordern…

    #Piraten #Dresden #StaDDrat

  3. @nimda
    :butterfedyA:
    :butterfedyB:
    :butterfedyC: respectively

    as you can see im an expert weekend waster, i liked what dsfgs did but it just needed a bit more color, anyone can make them a single color for their website but when we are emojiing fediverse they should be joyful as f@ck. again if they are lined up together they might do something special. :p

    #fediverseemoji #butterfedy @silverpill @r @gabriel @p

  4. @nimda
    :butterfedyA:
    :butterfedyB:
    :butterfedyC: respectively

    as you can see im an expert weekend waster, i liked what dsfgs did but it just needed a bit more color, anyone can make them a single color for their website but when we are emojiing fediverse they should be joyful as f@ck. again if they are lined up together they might do something special. :p

    #fediverseemoji #butterfedy @silverpill @r @gabriel @p

  5. Hey #subaru owners, you may have heard in the news that Subaru is collecting a *lot* of data on you, your passengers and your driving, and selling that data to (well, anyone who wants it, but in particular) insurance companies to use to raise your rates. If you would like to opt out of data sales, or limit data collection to "what is necessary or reasonably expected" (how is that not just the default?), or ask them to delete the data they've collected on you so far, or just to get a report listing what data they've collected on you.... you can do that here:

    https://subarucustomersupport.powerappsportals.com/Consumer-privacy/

    #PSA #privacy #dataabuse
  6. In light of the #Tumblr situation if you or others are looking to migrate and prefer the Tumblr style, here is a #Fediverse alternative https://app.wafrn.net/ #TumblrMigration

  7. #Economia en un mundo de Caos

    Desde diciembre escuchamos que #GAFAM y otras corporaciones de los #EsclavosUnidos estan despidiendo un promedio del 7%-10% de sus trabajadores, lo que se acerca cada vez mas a los 500.000 nuevos desempleados globalmente.

    Paralelamente esas mismas empresas anuncian distribucion de utilidades entre ejecutivos y accionistas que ya superan los varios BILLONES de U$D... entonces para cualquier mortal se le vienen a la mente preguntas tales como:

    - ¿Como se puede explicar el discurso "terrorista" de que con esas medidas solo quieren reducir los efectos de una crisis que se viene?
    - ¿Como se traduce el discurso del gobierno que habla de exito economico, de que la economia local esta mas solida que nunca?
    - ¿Que hay de los BILLONES de dolares que las compañias de energia de #USA le estan robando a #Europa?
    - ¿Que hay de las escandalosas utilidades de las corporaciones armamentistas y de muerte?

    En los ultimos dias he venido siguiendo el discurso bipolar de varios programas economicos y que ya comienzan a anunciar de un mas que probable estancamiento economico del gigante asiatico, mientras que guardan un silencio sepulcral sobre el caos que hay en las economias de Europa y USA.

    Por el momento, al parecer todos los expertos economicos no ven ningun riesgo, ni gran problema en las huelgas, ni los indicios de inflacion a causa del aumento de los costos en la produccion causada por los problemas energeticos... es como si estos solo fueran algo de muy corto plazo.

    Algo me huele raro en todo este discurso y si alguien me preguntara, yo me preocuparia un poquito mas en esta mezcla de descontento laboral y el alza casi sostenida en la canasta alimentacia para el mediano plazo, antes de seguir mirando en otras direcciones.
  8. @[email protected]:
    Wir haben heute mit ca 50 Menschen Emmas Zwangsräumung solidarisch begleitet. Viele Fälle bleiben oft unsichtbar & anonym - dieser nicht. Wir sind froh über mutige Menschen, die ihre Situation öffentlich machen & Missstände aufzeigen. #stopevictions #zwangsräumungenverhindern
  9. @[email protected]:
    Wir haben heute mit ca 50 Menschen Emmas Zwangsräumung solidarisch begleitet. Viele Fälle bleiben oft unsichtbar & anonym - dieser nicht. Wir sind froh über mutige Menschen, die ihre Situation öffentlich machen & Missstände aufzeigen. #stopevictions #zwangsräumungenverhindern
  10. @[email protected]:
    Wir haben heute mit ca 50 Menschen Emmas Zwangsräumung solidarisch begleitet. Viele Fälle bleiben oft unsichtbar & anonym - dieser nicht. Wir sind froh über mutige Menschen, die ihre Situation öffentlich machen & Missstände aufzeigen. #stopevictions #zwangsräumungenverhindern
  11. @[email protected]:
    Wir haben heute mit ca 50 Menschen Emmas Zwangsräumung solidarisch begleitet. Viele Fälle bleiben oft unsichtbar & anonym - dieser nicht. Wir sind froh über mutige Menschen, die ihre Situation öffentlich machen & Missstände aufzeigen. #stopevictions #zwangsräumungenverhindern
  12. langsam wird es etwas viel. ca. ein drittel meines streams wird mittlerweile von retweets verschiedener leute belegt. stellenweise sind das accounts die offenbar zu 95% twitter verbreiten. würde ich wissen wollen, was allgemein bei twitter los ist, hätte ich einen twitter account. will ich aber nicht und habe ich folglich nicht.

    es ist mal wieder putzzeit ...

    #twitter #fediverse #internet #twits
  13. Looks like #theBlaze put #LevinTV on #BlazeTV at 2. That's very nice, before it was like #ChadPrather or some other show I wasn't into
  14. > Freenode has blocked IRCCloud users from accessing their network.

    > We reiterate our recommendation to switch to a network that is secure, reliable, and has respect for the free choices made by the communities it hosts.

    > Check your project websites to find out where they've moved.
    nitter.exonip.de/IRCCloud/stat…

    #FreenodeTakeover
  15. Portugals Trainer Fernando Santos verzichtete gegen die Schweiz auf Cristiano Ronaldo in der Startelf – und hatte damit Erfolg. Der neu ins Team gekommene Gonçalo Ramos traf gleich dreimal. Nun wartet Marokko.
    6:1-Sieg gegen die Schweiz: Mit Ronaldo als Joker – Portugal stürmt ins Viertelfinale
    #Fußball-WM2022 #CristianoRonaldo #BenficaLissabon #YannSommer #XherdanShaqiri #Fußball-News
  16. Er entführte und tötete eine Achtjährige: Im aufsehenerregenden französischen Kriminalfall Maëlys wurde das Urteil gesprochen. Doch das Motiv des Ex-Soldaten bleibt unklar.
    Frankreich: Ex-Soldat wegen Mordes an Achtjähriger zu lebenslanger Haft verurteilt
    #Frankreich #SexuellerMissbrauchvonKindern #GewaltgegenKinder #Justiz
  17. ronin-db 0.1.3, ronin-exploits 1.0.4, and ronin-support 1.0.5 released! ronin-support 1.0.5 also adds support for the Ruby 3.3.0 that was just released.
    ronin-rb.dev/blog/2023/12/27/r
    #ronin #roninrb #ruby #infosec #securitytools

  18. @VQuaschning

    Tempo drosseln ist nun mehrfach angesagt, nicht nur um Klimaziele eher zu erreichen und den Geldbeuteln der Multis und den eigenen zu schonen.

    Sondern AUCH um Lärm zu mindern:

    Wirkung von Fahrgeschwindigkeit senkungen auf Bundesautobahnen
    Maßnahme Tag Nacht
    Von 130 km/h auf 120 km/h -0,4 dB -0,2 dB
    Von 130 km/h auf 100 km/h -1,3 dB -0,6 dB
    Von 100 km/h auf 80 km/ h -1,9 dB -1,9 dB

    Verkehrsmix für Schwerlastverkehr basierend auf RLS-19-Standardwerten für Bundesautobahnen. … unterschiedliche Wirkungen für Tag/Nacht
    [Umweltbundesamt Dessau: Lärmaktionsplan - Lärmminderungeseffekte von Maßnahmen, Seite 20 (Stand: 07/2023)]

    #WegVomÖl #ProTempoLimit
    #Tempo #ExitGas #peakOil #WegVonGasReiche

    @sven_giegold

    @m_hundhausen

    @fff

  19. @VQuaschning

    Tempo drosseln ist nun mehrfach angesagt, nicht nur um Klimaziele eher zu erreichen und den Geldbeuteln der Multis und den eigenen zu schonen.

    Sondern AUCH um Lärm zu mindern:

    Wirkung von Fahrgeschwindigkeit senkungen auf Bundesautobahnen
    Maßnahme Tag Nacht
    Von 130 km/h auf 120 km/h -0,4 dB -0,2 dB
    Von 130 km/h auf 100 km/h -1,3 dB -0,6 dB
    Von 100 km/h auf 80 km/ h -1,9 dB -1,9 dB

    Verkehrsmix für Schwerlastverkehr basierend auf RLS-19-Standardwerten für Bundesautobahnen. … unterschiedliche Wirkungen für Tag/Nacht
    [Umweltbundesamt Dessau: Lärmaktionsplan - Lärmminderungeseffekte von Maßnahmen, Seite 20 (Stand: 07/2023)]

    #WegVomÖl #ProTempoLimit
    #Tempo #ExitGas #peakOil #WegVonGasReiche

    @sven_giegold

    @m_hundhausen

    @fff

  20. @VQuaschning

    Tempo drosseln ist nun mehrfach angesagt, nicht nur um Klimaziele eher zu erreichen und den Geldbeuteln der Multis und den eigenen zu schonen.

    Sondern AUCH um Lärm zu mindern:

    Wirkung von Fahrgeschwindigkeit senkungen auf Bundesautobahnen
    Maßnahme Tag Nacht
    Von 130 km/h auf 120 km/h -0,4 dB -0,2 dB
    Von 130 km/h auf 100 km/h -1,3 dB -0,6 dB
    Von 100 km/h auf 80 km/ h -1,9 dB -1,9 dB

    Verkehrsmix für Schwerlastverkehr basierend auf RLS-19-Standardwerten für Bundesautobahnen. … unterschiedliche Wirkungen für Tag/Nacht
    [Umweltbundesamt Dessau: Lärmaktionsplan - Lärmminderungeseffekte von Maßnahmen, Seite 20 (Stand: 07/2023)]

    #WegVomÖl #ProTempoLimit
    #Tempo #ExitGas #peakOil #WegVonGasReiche

    @sven_giegold

    @m_hundhausen

    @fff

  21. @VQuaschning

    Tempo drosseln ist nun mehrfach angesagt, nicht nur um Klimaziele eher zu erreichen und den Geldbeuteln der Multis und den eigenen zu schonen.

    Sondern AUCH um Lärm zu mindern:

    Wirkung von Fahrgeschwindigkeit senkungen auf Bundesautobahnen
    Maßnahme Tag Nacht
    Von 130 km/h auf 120 km/h -0,4 dB -0,2 dB
    Von 130 km/h auf 100 km/h -1,3 dB -0,6 dB
    Von 100 km/h auf 80 km/ h -1,9 dB -1,9 dB

    Verkehrsmix für Schwerlastverkehr basierend auf RLS-19-Standardwerten für Bundesautobahnen. … unterschiedliche Wirkungen für Tag/Nacht
    [Umweltbundesamt Dessau: Lärmaktionsplan - Lärmminderungeseffekte von Maßnahmen, Seite 20 (Stand: 07/2023)]

    #WegVomÖl #ProTempoLimit
    #Tempo #ExitGas #peakOil #WegVonGasReiche

    @sven_giegold

    @m_hundhausen

    @fff

  22. @VQuaschning

    Tempo drosseln ist nun mehrfach angesagt, nicht nur um Klimaziele eher zu erreichen und den Geldbeuteln der Multis und den eigenen zu schonen.

    Sondern AUCH um Lärm zu mindern:

    Wirkung von Fahrgeschwindigkeit senkungen auf Bundesautobahnen
    Maßnahme Tag Nacht
    Von 130 km/h auf 120 km/h -0,4 dB -0,2 dB
    Von 130 km/h auf 100 km/h -1,3 dB -0,6 dB
    Von 100 km/h auf 80 km/ h -1,9 dB -1,9 dB

    Verkehrsmix für Schwerlastverkehr basierend auf RLS-19-Standardwerten für Bundesautobahnen. … unterschiedliche Wirkungen für Tag/Nacht
    [Umweltbundesamt Dessau: Lärmaktionsplan - Lärmminderungeseffekte von Maßnahmen, Seite 20 (Stand: 07/2023)]

    #WegVomÖl #ProTempoLimit
    #Tempo #ExitGas #peakOil #WegVonGasReiche

    @sven_giegold

    @m_hundhausen

    @fff

  23. Russia now has more money to spend on nuclear weapons as #Finland paid 29 million € for #NuclearFuel to #NuclearWeapons manufacturer #Rosatom in July Last year it was more, 50 million € Nuclear energy is not affected by sanctions.. Data from Finnish Customs database uljas.tulli.fi/v3rti/db/0/c...

  24. ronin 2.0.5, ronin-support 1.0.3, ronin-db-activerecord 0.1.2, ronin-db 0.1.2, ronin-vulns 0.1.4, ronin-payloads 0.1.4, and ronin-exploits 1.0.3 released!
    ronin-rb.dev/blog/2023/09/19/r
    #ronin #roninrb #ruby #security #infosec

  25. Z80 and AY-3-8910 – Part 2

    I’ve spent a bit of time looking at the “Tester” part of the AY driver code for Tim Follin’s music archive that I talked about in Z80 and AY-3-8910.

    This is documenting what I think I’ve worked out so far for the tester code.

    The Sound Tester

    As previously mentioned, there are essentially three parts to the code in Follin archive:

    • The tune and effect data.
    • Ste Ruddy’s Sound Driver.
    • A tracker-style (ish) tester UI application.

    The first part looked at the sound driver itself, and essentially skipped over the tester part of the code. This post picks up on that tester code.

    Reminder, from part one, the main structure is as follows:

    Code_Start: EQU 40000
    Data_Start: EQU 50000

    ;-----------------------------
    ORG Code_Start

    ; The UI/tester code
    TESTER:
    LOOP: Calls the following for each scan:
    HALT - Suspends until an interrupt comes in?
    CALL UPDATE
    CALL REFRESH
    CALL CLOCK
    CALL KEYSCAN
    Repeat as necessary

    KEYSCAN: UI scanning
    CLOCK: Possibly maintain a 50Hz refresh rate clock?
    UPDATE: Loads the internal state of all sound variables from
    the driver and displays them in real time via the UI.

    ; The sound driver
    CODE_TOP:
    TUNE: Select which tune to play.
    TUNE_IN: Init all internal sound state variables for a new tune.
    TUNEOFF: Stop a playing tune, eg to change tune or start an FX.

    FX: Start playing an FX.
    FLOOP: Keep processing FX instructions until complete.

    REFRESH: "run" a scan of the sound driver updating and outputting the sound

    The Tester Code

    Initialisation information and main screen data:

    ;**************************************

    ; Z80 AY MUSIC DRIVER

    ;**************************************

    ; ORG 40000
    ; LOAD 0C000H

    ;======================================
    ;STACK DEPTHS

    SD: EQU 3

    ;======================================

    ASCII: EQU 23560 ; 23560 = $5C08 = System Variable "LAST K"

    TESTER: PUSH AF
    PUSH BC
    PUSH DE
    PUSH HL

    XOR A ; ASCII = MINS = SECS = 0
    LD (ASCII),A
    LD (MINS),A
    LD (SECS),A

    CALL TUNEOFF ; TUNE initialisation
    CALL STACKMESS ; Kick off the Tester code!

    DB CLS ; The start of the main UI data
    DB AT,0,0
    DB INK,01010111B
    DB "'AY' MUSIC DRIVE"
    DB "R V2 BY S.RUDDY"

    ... Skip ...

    DB INK,64+5
    DB "VOLUME "
    DB " "
    DB 255

    ... Skip ...

    AT: EQU 22
    INK: EQU 16
    CLS: EQU 15

    STACKMESS: POP IX
    CALL MESS
    JP (IX)

    There is a whole lot of screen data in DB blocks which includes some “op codes” that are defined later: AT, INK, CLS. These are special codes that are used by the ROM-based print routines (more here), as used by Sinclair BASIC, but in this case they are spelt out directly, later in code. The final 255 signifies the end of the screen data.

    So how are these definitions handled? That all comes up in the “MESS” routine I’ll get to in a moment, but first that “STACKMESS” routine needs a bit of explanation.

    When a CALL instruction happens, such as the CALL STACKMESS at the start, the current program counter gets pushed onto the stack. In this case the current PC will point to the instruction after the CALL, which happens to be the start of the screen data. So the POP IX will grab the address of the screen data and drop it into IX and then call the “MESS” function to actually get on with it!

    But before I get to that, there is some more code after the screen data:

                    LD HL,CALC1
    PUSH HL
    LD A,H
    LD DE,4067H ; Output high byte
    CALL HEX
    POP HL
    LD A,L
    LD DE,4069H ; Output low byte
    CALL HEX

    LD HL,(CALC2)
    PUSH HL
    LD A,H
    LD DE,4071H ; Output number of Tunes
    CALL HEX
    POP HL
    LD A,L
    LD DE,4073H ; Output number of effects
    CALL HEX

    LD HL,CALC1
    LD DE,(CALC2)
    ADD HL,DE
    PUSH HL
    LD A,H
    LD DE,407CH ; Not entirely sure what this is outputting...
    CALL HEX
    POP HL
    LD A,L
    LD DE,407EH
    CALL HEX

    This is writing some basic data out to the display. CALC1 seems to relate to code section size. I believe CALC2 is the start address of the tune data, which is the following:

                    ORG Data_Start

    TUNES: EQU 5
    EFFECTS: EQU 21

    All three of these sections are outputting a 16-bit value in two single-byte chunks using the “HEX” routine, which takes a screen address (in the range $4000-$57FF) and outputs a hex number at that screen location.

    So while I’m at it then, how is that HEX function working?

    ;--------------------------------------
    HEX: INC DE ; DE contains the screen address to use
    PUSH AF ; Start with DE+1
    CALL ONEnib ; Write out the LOW 4-bits
    POP AF
    RRA ; A = A>>4
    RRA ; to write out HIGH 4-bits
    RRA
    RRA
    DEC DE ; Back to original DE screen address
    ONEnib: AND 15 ; A = A & 0xF
    ADD A ; BC = A * 2
    LD C,A
    LD B,0
    LD HL,ROM_TAB ; Read from ROM_TAB[BC]
    ADD HL,BC
    LD A,(HL)
    INC HL
    LD H,(HL)
    LD L,A ; HL = (uint16_t)ROM_TAB[A]
    MIKESbug: LD C,D ; So HL now points to character bitmap in ROM
    LD B,8 ; Write out 8 bytes to display memory directly
    PRloop: LD A,(HL) ; (DE) = (HL)
    LD (DE),A
    INC HL ; HL++
    INC D ; NB: Layout of display mem means D++ is next line of char
    ; for same value of E.
    DJNZ PRloop ; WHILE (B-- > 0)
    LD D,C ; (Restore D before returning, so DE still = screen addr)
    RET

    ROM_TAB: DW 3D80H ; ROM character set: 3D80 = "0"
    DW 3D88H ; Each char = 8 x 8 bits
    DW 3D90H
    DW 3D98H
    DW 3DA0H
    DW 3DA8H
    DW 3DB0H
    DW 3DB8H
    DW 3DC0H
    DW 3DC8H ; = "9"
    DW 3E08H ; = "A"
    DW 3E10H
    DW 3E18H
    DW 3E20H
    DW 3E28H
    DW 3E30H ; = "F"

    This is making use of the character set stored in the Spectrum ROM (more here) which is indexed via a 16-word jump table mapping the characters onto each of the 16 hex characters: 0..9, A..F.

    Then each byte, 8 in total, of the character is written directly out to the Spectrum screen memory taking advantage of the odd formatting of the screen memory to easily skip to the next line of the display for each line of the character (more here).

    So before I get into the main update loop, how the screen initialised and set up? That happens in the “MESS” and some ancillary functions.

    MESS:           LD A,(IX+0)         ; At this point, McursorX, McursorY = (0,0)
    INC IX ; So read a byte of screen data
    OR A
    RET M ; Stop IF A=255 (i.e. negative)
    CP 32
    JR C,Mcontrol ; IF A<32 process control character then RET back to "MESS"
    CALL Mgetchar ; ELSE Process character
    CALL Mgetaddr ; Get screen address for next output in DE
    CALL MIKESbug ; Output the character
    CALL PRattr ; Set the colour attributes
    CALL INCcursor ; Update the screen position for the next byte of screen data
    JR MESS

    Mcontrol: LD HL,MESS ; Stick the address of "MESS" on the stack for the RET
    PUSH HL
    CP 15 ; IF A == CLS
    JR Z,Mcls
    CP 22 ; IF A == AT
    JP Z,Mat
    CP 16 ; IF A == INK
    JR Z,Mink
    RET ; RETurn to "MESS"

    Mcolour: DB 0 ; Working variables for cursor position and colour
    McursorX: DB 0
    McursorY: DB 0 ; Has to be directly after McursorX (see later)

    Mink: LD A,(IX+0) ; Process INK to set colour
    INC IX
    LD (Mcolour),A
    RET

    Mcls: LD HL,4000H ; Process CLS to clear screen
    LD (HL),L
    LD DE,4001H
    LD BC,1AFFH
    LDIR
    LD (McursorX),BC
    RET

    INCcursor: LD HL,McursorX ; Moves the cursor on one position
    LD A,(HL)
    INC A
    AND 31
    LD (HL),A ; X++; X = X % 32
    RET NZ ; IF X==0; Y++
    INC HL ; Assumes McursorY is McursorX++
    INC (HL)
    RET

    Mgetchar: LD L,A ; HL = A*8 + 3C00
    LD H,0 ; Note: A > 32; where 32="Space"
    ADD HL,HL ; In ROM, space is address 3D00
    ADD HL,HL ; 32 * 8 = 0x100
    ADD HL,HL
    LD BC,3C00H
    ADD HL,BC ; HL = Start address of character map for char in A in ROM
    RET

    .... skip ....

    Mgetaddr: LD A,(McursorY) ; Calculate the screen address for (McursorX, McursorY)
    AND 18H
    OR 40H
    LD D,A
    LD A,(McursorY)
    RRCA
    RRCA
    RRCA
    AND 0E0H
    LD E,A
    LD A,(McursorX)
    ADD E
    LD E,A
    RET ; DE = required screen address

    Mat: LD A,(IX+0) ; Set cursor to provided X, Y in screen data
    LD (McursorX),A
    INC IX
    LD A,(IX+0)
    LD (McursorY),A
    INC IX
    RET

    PRattr: LD A,D ; Get address of ATTRibute memory
    RRA
    RRA
    RRA
    AND 3
    OR 58H
    LD D,A
    LD A,(Mcolour)
    LD (DE),A ; And set the colour
    RET

    Basically this loop keeps working on the provided screen data until the value 255 is found, at which point it returns. There are two paths for handling the data:

    • IF the value is < 32 then it is a control value. Only CLS, AT and INK are recognised.
    • ELSE the value is assumed to be an ASCII character and is displayed.

    Whatever is happening, happens at the coordinates given by (McursorX, McursorY) which start out as (0,0) and get updated automatically when a character is output, or in response to an AT command. INK will set the required colour in Mcolour, which again starts out as 0. This is applied after the character is written to the screen, using the PRattr function.

    There is a fun bit of optimisation going on in Mcontrol. At the start it pushes the address of the MESS function on the stack, which means that the RET will jump back to the start of MESS rather than where the jump happened to Mcontrol itself.

    There is another shortcut in the Mcls function: LDIR. From http://z80-heaven.wikidot.com/instructions-set:ldir: “Repeats LDI (LD (DE),(HL), then increments DE, HL, and decrements BC) until BC=0.” By setting the contents of HL (the first byte of the display) to zero, this will tile that same value across the display memory until BC, which starts at $1AFF, is zero. This will zero the whole display – both pixels and attributes – from 0x4000 through to 0x5AFF.

    Now finally, we get to the main update loop.

    LOOP:           
    HALT
    CALL UPDATE ; Update the display from the current Sound parameters
    LD A,2
    OUT (254),A ; Set border to 2
    CALL REFRESH ; Update the sound driver parameters
    XOR A
    OUT (254),A ; Set border to 0
    CALL CLOCK ; Run 50Hz clock
    CALL KEYSCAN ; Guess what - scans the keyboard 🙂
    LD A,07FH
    IN A,(254) ; Reads 0x7FFE which is the bottom row of the keyboard
    AND 1
    JP NZ,LOOP ; Checks bit 0, which is the SPACE key
    LD BC,65533 ; AY OUTPUT PORTS (FFFD, BFFD)
    LD A,7
    OUT (C),A
    LD BC,49149
    LD A,63 ; Set AY register 7 to 63 - i.e. all channels OFF
    OUT (C),A

    POP HL
    POP DE
    POP BC
    POP AF
    RET

    I’m not going through the sub routines of the loop, other than to note the following:

    • UPDATE is a whole series of instructions that basically do the following to output the HEX value of a sound parameter:
    LD A, (contents of one of the sound variables)
    LD DE, (corresponding screen address for the variable to be displayed)
    CALL HEX
    • REFRESH runs the sound driver itself, as described in Z80 and AY-3-8910.
    • CLOCK decrements the FIFTY variable and every time it gets to zero updates SECS and MINS and writes them out to the display. As it also uses the HEX routine, I guess it is storing the time using binary-coded decimal (BCD).
    • KEYSCAN reads the last key pressed from the system variable location stored in ASCII (23560 / 0x5C08).

    At some point I might come back and work out what keys do what…

    Closing Thoughts

    I’d really like to get some of this code running on some of the alternate Z80 platforms I have. Getting the sound output shouldn’t be too much of an issue, but I’d really like to have some kind of display too.

    But as can be seen above, the tester UI is pretty well tied into the oddities of the ZX Spectrum display, so porting it won’t be trivial.

    I suspect there are already some existing AY/chiptune players that perhaps would be a better starting point, but from what I’ve seen they tend to stream the register data after having sampled it at regular intervals, which isn’t quite what I was after… there would be something really quite interesting about actually running Ste Ruddy’s Sound Driver with a Tim Follin soundtrack programmed in.

    Kevin

    #ay38910 #TimFollin #zxSpectrum