Difference between revisions of "Z80:DevTuesday"

From SpecNext official Wiki
Jump to: navigation, search
(new code snippets)
(Adding two more snippets posted on Next discord)
 
(28 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
==== 2024 week 12 (Mar 19) ====
 +
 +
Ped7g - 9 bytes routine calculating byte size 1,2 or 4 (C like integer types) from number of bits (A = 1..32):<br>
 +
[https://gist.github.com/ped7g/27ffe953d7af00a687dd8c9d6ea7ad6c source @github gists]<br>
 +
[https://www.facebook.com/groups/z80asm/posts/1992580414468910/ original challenge post @fb]
 +
 +
==== 2023 week 32 (Aug 10) ====
 +
 +
em00k - dot command converting SL2 images + Next Palette to 256 color BMP:<br>
 +
[https://github.com/em00k/sl2bmp source and binary @github]
 +
 +
==== 2023 week 19 (May 9) ====
 +
 +
Ped7g - Z80 quicksort array of pointers to 64 byte long strings (esxdos filenames):<br>
 +
[https://www.facebook.com/groups/SpectrumNextDev/posts/1886842855027058/ facebook post (for comments/questions)]<br>
 +
[https://gist.github.com/ped7g/5b29c9199494bf35ee5b0aeacf98df75 quicksort_strings.asm source @github gists]
 +
 +
==== 2022 week 7 (Feb 15) ====
 +
 +
Ped7g - Z80N specific optimisation of calculating address in 90 degree rotated char buffer:<br>
 +
[https://discord.com/channels/556228195767156758/686699389703422030/942746180645969981 discord post with NEX file]<br>
 +
[https://gist.github.com/ped7g/cc65958c69f08564d140ffd14a9ef715 clockwise32x32char_z80n.asm source @github gists]
 +
 +
==== 2021 week 33 (Aug 17) ====
 +
 +
Ped7g - RRCA-like nibbles rotation, both Z80N and Z80 variants:<br>
 +
[https://www.facebook.com/groups/SpectrumNextDev/posts/1443193089392039/ facebook post (for comments/questions)]<br>
 +
[https://github.com/ped7g/ZXSpectrumNextMisc/blob/master/snippets/bit_fun.i.asm source+NEX @github]
 +
 +
==== 2021 week 30 (Jul 27) ====
 +
 +
Ped7g - "modulo 192" and "modulo 40" Z80N routine:<br>
 +
[https://www.facebook.com/groups/SpectrumNextDev/posts/1429633577414657/ facebook post (for comments/questions)]<br>
 +
[https://github.com/ped7g/ZXSpectrumNextMisc/blob/master/snippets/mod192.i.asm source+NEX @github] [https://github.com/ped7g/ZXSpectrumNextMisc/blob/master/snippets/mod40.i.asm (mod 40)]
 +
 +
==== 2021 week 23 (Jun 8) ====
 +
 +
Ped7g - "modulo 320" Z80N routine:<br>
 +
[https://www.facebook.com/groups/SpectrumNextDev/permalink/1392874804423868/ facebook post (for comments/questions)]<br>
 +
[https://github.com/ped7g/ZXSpectrumNextMisc/blob/master/snippets/mod320.i.asm source+NEX @github]
 +
 +
==== 2021 week 14 (Apr 6) ====
 +
 +
Ped7g - size-optimised initialisation of longer nextreg-value pairs:<br>
 +
[https://www.facebook.com/groups/SpectrumNextDev/permalink/1350742898637059/ facebook post (for comments/questions)]<br>
 +
[https://gist.github.com/ped7g/b33111b1d91dc4441b8579831da507bc source @github gists]
 +
 +
==== 2021 week 5 (Feb 2) ====
 +
 +
Ped7g (based on Omega's code from VOID demo) - second version - ULA attributes fade in/out:<br>
 +
[https://www.facebook.com/groups/SpectrumNextDev/permalink/1307156776329005/ facebook post with video]<br>
 +
[https://gist.github.com/ped7g/ad3fb234fb800df7a22e858c4d2daf4f source @github gists]
 +
 +
==== 2021 week 2 (Jan 12) ====
 +
 +
Ped7g (based on Omega's code from VOID demo) - ULA attributes fade in/out (code-size focused):<br>
 +
[https://www.facebook.com/groups/SpectrumNextDev/permalink/1292610091117007/ facebook post]<br>
 +
[https://gist.github.com/ped7g/4bb94291ff379441494110f13825d956 source @github gists]
 +
 +
==== 2021 week 1 (Jan 5) ====
 +
 +
Ped7g (based on work and discussions of fellow Next devs) - detect Z80N CPU:<br>
 +
[https://www.facebook.com/groups/SpectrumNextDev/permalink/1290430268001656/ facebook post]<br>
 +
[https://github.com/ped7g/ZXSpectrumNextMisc/blob/master/snippets/detectZ80N.i.asm source+NEX @github]
 +
 +
==== 2020 week 51 (Dec 15) ====
 +
 +
Busy/Baze/Zilog/Ped7g - decode 5-bit-letter bitstream in 19 bytes:<br>
 +
[https://www.facebook.com/groups/SpectrumNextDev/permalink/1272923016419048/ facebook post]<br>
 +
[https://github.com/ped7g/ZXSpectrumNextMisc/blob/master/snippets/strings5bPacked.i.asm source+NEX @github]
 +
 +
==== 2020 week 45 (Nov 3) ====
 +
 +
Ped7g - displaying all 512 colours which ZX Next could produce on screen:<br>
 +
[https://www.facebook.com/groups/SpectrumNextDev/permalink/1239989036379113/ facebook post]<br>
 +
[https://github.com/ped7g/ZXSpectrumNextMisc/tree/master/ShowAll512Colors source+NEX @github]
 +
 +
==== 2020 week 44 (Oct 27) ====
 +
 +
Ped7g - assembly snippets: integer comparison and finding total number of video-lines:<br>
 +
[https://www.facebook.com/groups/SpectrumNextDev/permalink/1232468550464495/ facebook post]<br>
 +
[https://github.com/ped7g/ZXSpectrumNextMisc/tree/master/snippets source @github]
 +
 +
em00k - loadbmp various examples:<br>
 +
[https://github.com/em00k/loadbmp-asm source @github]
 +
 +
==== 2020 week 42 (Oct 13) ====
 +
 +
Ped7g - v2 of using ZX128 shadow ULA screen and nextreg $69 for "double buffering":<br>
 +
[https://gist.github.com/ped7g/59e7b3941177444ffb48ac974f3e8ba6 v2 source @github gists] - using also DMA and custom IM1 routine
 +
 +
==== 2020 week 41 (Oct 6) ====
 +
 +
Matt Davies - simple game controls (reads "OPQA space" and MD1 joystick):<br>
 +
[https://www.facebook.com/groups/SpectrumNextDev/permalink/1216026642108686/ facebook post]<br>
 +
[https://gitlab.com/-/snippets/2022943 source @gitlab snippets]
 +
 +
Matt Davies - Z80N Bit Arrays:<br>
 +
[https://www.facebook.com/groups/SpectrumNextDev/permalink/1216836478694369/ facebook post]<br>
 +
[https://gitlab.com/-/snippets/2025829 source @gitlab snippets]
 +
 +
Ped7g - using ZX128 shadow ULA screen and nextreg $69 for "double buffering":<br>
 +
[https://gist.github.com/ped7g/80fd30f8c731b9f52b3952033a6a8564 v1 source @github gists]
 +
 +
==== 2020 week 32 (Aug 4) ====
 +
 +
Ped7g - reading Atari "driving controller" on Kempston 2 port:<br>
 +
[https://www.facebook.com/groups/SpectrumNextDev/permalink/1164980020546682/ facebook post]<br>
 +
[https://github.com/ped7g/ZXSpectrumNextMisc/tree/master/ReadingAtariDrivingController source and NEX file @github]
 +
 +
==== 2020 week 22 (May 26) ====
 +
 +
Ped7g - palette fade-out effect in Layer2 320x256 mode (using linear interpolation with Bresenham algorithm):<br>
 +
[https://www.facebook.com/groups/SpectrumNextDev/permalink/1108343799543638/ facebook post]<br>
 +
[https://github.com/ped7g/ZXSpectrumNextMisc/tree/master/Layer2FadeOut source @github]
 +
 +
==== 2020 week 19 (May 5) ====
 +
 +
Ped7g - big-picture scroll in Layer2 320x256 mode:<br>
 +
[https://www.facebook.com/groups/SpectrumNextDev/permalink/1093029257741759/ facebook post]<br>
 +
[https://github.com/ped7g/ZXSpectrumNextMisc/tree/master/Layer2BigPic source @github]
 +
 +
==== 2020 week 12 (Mar 17) ====
 +
 +
Matt Davies - DMA copy and fill:<br>
 +
[https://www.facebook.com/groups/SpectrumNextDev/permalink/1055703608140991/ facebook post]<br>
 +
[https://pastebin.com/MUW6Sdqu source @pastebin]
 +
 +
==== 2020 week 11 (Mar 10) ====
 +
 +
Matt Davies - A string compare routine:<br>
 +
[https://www.facebook.com/groups/SpectrumNextDev/permalink/1050260452018640/ facebook post]<br>
 +
[https://pastebin.com/bJE20PpG source @pastebin]
 +
 +
==== 2020 week 10 (Mar 3) ====
 +
 +
em0000k - Simple Tilemap Example:<br>
 +
[https://www.facebook.com/groups/SpectrumNextDev/permalink/1045142775863741/ facebook post]<br>
 +
[https://github.com/em00k/TileMap-Example source @github]
 +
 +
Ped7g - clamping HL value to -0x100..+0x100 (16b signed math):<br>
 +
[https://gist.github.com/ped7g/b3085bef885b5b96515eea2ca27f9b19 source @gist.github]
 +
 
==== 2020 week 8 (Feb 18) ====
 
==== 2020 week 8 (Feb 18) ====
  
Line 4: Line 147:
 
[https://www.facebook.com/groups/SpectrumNextDev/permalink/1035259330185419/ facebook post]<br>
 
[https://www.facebook.com/groups/SpectrumNextDev/permalink/1035259330185419/ facebook post]<br>
 
[https://pastebin.com/cZyHH2hJ source @pastebin]
 
[https://pastebin.com/cZyHH2hJ source @pastebin]
 +
 +
em0000k - DMA samples player (one channel, different samples in succession):<br>
 +
[https://www.specnext.com/forum/viewtopic.php?f=16&t=1520&sid=6ac453da2e2b92b6b197563d7a7d7c90 forum post]<br>
 +
[https://pastebin.com/yDkre4jA source @pastebin]
 +
 +
Chris Kirby - simple cooperative multitasking system for z80.<br>
 +
[https://www.facebook.com/groups/SpectrumNextDev/permalink/1035395633505122/ facebook post]<br>
 +
[https://pastebin.com/GFDN6ex8 source @pastebin]
  
 
==== 2020 week 7 (Feb 11) ====
 
==== 2020 week 7 (Feb 11) ====
Line 10: Line 161:
 
[https://www.facebook.com/groups/SpectrumNextDev/permalink/1029263027451716/ facebook post]<br>
 
[https://www.facebook.com/groups/SpectrumNextDev/permalink/1029263027451716/ facebook post]<br>
 
[https://pastebin.com/nJuaUgkc source @pastebin]
 
[https://pastebin.com/nJuaUgkc source @pastebin]
 +
[https://gitlab.com/-/snippets/2080070 "2021 variant" @gitlab]
  
 
David Saphier - DMA sample player:<br>
 
David Saphier - DMA sample player:<br>

Latest revision as of 21:16, 22 March 2024

2024 week 12 (Mar 19)

Ped7g - 9 bytes routine calculating byte size 1,2 or 4 (C like integer types) from number of bits (A = 1..32):
source @github gists
original challenge post @fb

2023 week 32 (Aug 10)

em00k - dot command converting SL2 images + Next Palette to 256 color BMP:
source and binary @github

2023 week 19 (May 9)

Ped7g - Z80 quicksort array of pointers to 64 byte long strings (esxdos filenames):
facebook post (for comments/questions)
quicksort_strings.asm source @github gists

2022 week 7 (Feb 15)

Ped7g - Z80N specific optimisation of calculating address in 90 degree rotated char buffer:
discord post with NEX file
clockwise32x32char_z80n.asm source @github gists

2021 week 33 (Aug 17)

Ped7g - RRCA-like nibbles rotation, both Z80N and Z80 variants:
facebook post (for comments/questions)
source+NEX @github

2021 week 30 (Jul 27)

Ped7g - "modulo 192" and "modulo 40" Z80N routine:
facebook post (for comments/questions)
source+NEX @github (mod 40)

2021 week 23 (Jun 8)

Ped7g - "modulo 320" Z80N routine:
facebook post (for comments/questions)
source+NEX @github

2021 week 14 (Apr 6)

Ped7g - size-optimised initialisation of longer nextreg-value pairs:
facebook post (for comments/questions)
source @github gists

2021 week 5 (Feb 2)

Ped7g (based on Omega's code from VOID demo) - second version - ULA attributes fade in/out:
facebook post with video
source @github gists

2021 week 2 (Jan 12)

Ped7g (based on Omega's code from VOID demo) - ULA attributes fade in/out (code-size focused):
facebook post
source @github gists

2021 week 1 (Jan 5)

Ped7g (based on work and discussions of fellow Next devs) - detect Z80N CPU:
facebook post
source+NEX @github

2020 week 51 (Dec 15)

Busy/Baze/Zilog/Ped7g - decode 5-bit-letter bitstream in 19 bytes:
facebook post
source+NEX @github

2020 week 45 (Nov 3)

Ped7g - displaying all 512 colours which ZX Next could produce on screen:
facebook post
source+NEX @github

2020 week 44 (Oct 27)

Ped7g - assembly snippets: integer comparison and finding total number of video-lines:
facebook post
source @github

em00k - loadbmp various examples:
source @github

2020 week 42 (Oct 13)

Ped7g - v2 of using ZX128 shadow ULA screen and nextreg $69 for "double buffering":
v2 source @github gists - using also DMA and custom IM1 routine

2020 week 41 (Oct 6)

Matt Davies - simple game controls (reads "OPQA space" and MD1 joystick):
facebook post
source @gitlab snippets

Matt Davies - Z80N Bit Arrays:
facebook post
source @gitlab snippets

Ped7g - using ZX128 shadow ULA screen and nextreg $69 for "double buffering":
v1 source @github gists

2020 week 32 (Aug 4)

Ped7g - reading Atari "driving controller" on Kempston 2 port:
facebook post
source and NEX file @github

2020 week 22 (May 26)

Ped7g - palette fade-out effect in Layer2 320x256 mode (using linear interpolation with Bresenham algorithm):
facebook post
source @github

2020 week 19 (May 5)

Ped7g - big-picture scroll in Layer2 320x256 mode:
facebook post
source @github

2020 week 12 (Mar 17)

Matt Davies - DMA copy and fill:
facebook post
source @pastebin

2020 week 11 (Mar 10)

Matt Davies - A string compare routine:
facebook post
source @pastebin

2020 week 10 (Mar 3)

em0000k - Simple Tilemap Example:
facebook post
source @github

Ped7g - clamping HL value to -0x100..+0x100 (16b signed math):
source @gist.github

2020 week 8 (Feb 18)

Matt Davies - Some simple utilities:
facebook post
source @pastebin

em0000k - DMA samples player (one channel, different samples in succession):
forum post
source @pastebin

Chris Kirby - simple cooperative multitasking system for z80.
facebook post
source @pastebin

2020 week 7 (Feb 11)

Matt Davies - Memory page allocation:
facebook post
source @pastebin "2021 variant" @gitlab

David Saphier - DMA sample player:
facebook post
source @pastebin

Robin Verhagen-Guest - Multiframe Copper program:
facebook post
source @pastebin