ZX Spectrum Machine Code: Fill screen

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ส.ค. 2023
  • Using a program called Hexld3 from "Mastering Machine Code on your ZX Spectrum", by Toni Baker (1983). skip to 5:30 for the start of writing machine code to set all pixels on screen.
    Download my typed in version here:
    github.com/AdrianPilko/ZXSpec...
    #zxspectrum #sinclairzxspectrum #machinecode
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 21

  • @mostlyindica
    @mostlyindica 10 หลายเดือนก่อน +5

    Still have her book for the ZX81... what a hero.

  • @disdroid
    @disdroid 2 หลายเดือนก่อน

    Machine Code Sprites and Graphics was my favourite

  • @EGC316
    @EGC316 2 หลายเดือนก่อน

    Thanks for clearing that up.

  • @K.F-R
    @K.F-R 5 หลายเดือนก่อน

    That book changed my life. Thanks for sharing.

  • @merlin5476
    @merlin5476 10 หลายเดือนก่อน +3

    I used to Love getting hold of the latest Crash magazine & spend many hours typing away on a sunday after dinner. The end results weren't all that impressive though.
    But you did learn a bit about basic programming. Also remembering to save what you typed before running was essential.

  • @SimonSeabridgeSnookerCoaching
    @SimonSeabridgeSnookerCoaching 5 หลายเดือนก่อน

    Mind boggling. Could never get my head around it.

  • @MikePerigo
    @MikePerigo 10 หลายเดือนก่อน +3

    It looks like the spectrum version of the book is, as expected, a nicely updated version of the excellent ZX81 version. It does however seem to be missing the delightful bonus suprise program 'farewell' which appears after the appendices at the end of the book.
    It would obviously have to be updated for the new screen layout and wouldn't be as impressive on the Speccy which already has a hi-res screen but it does seem a shame it didn't make the cut.

    • @timmuston2687
      @timmuston2687 5 หลายเดือนก่อน +1

      Back in my youth I had both books. The farewell program for the zx81 was quite a surprise.

  • @cprince10
    @cprince10 8 หลายเดือนก่อน

    Great video. If I draw a box using Plot and Draw, how do I fill in the box with colour?

    • @byteforever7829
      @byteforever7829  8 หลายเดือนก่อน +2

      10 BORDER 0
      20 PAPER 0
      30 INK 7
      40 CLS
      50 LET x = 10
      60 LET y = 10
      70 LET size = 10
      80 FOR i = 1 TO size
      90 PLOT x+i,y
      100 PLOT x,y+i
      110 PLOT x+size,y+i
      120 PLOT x+i,y+size
      130 NEXT i
      140 PAUSE 0
      This code sets up the background color, ink color, clears the screen, and then uses a loop to plot the lines that form a square and fill it with color. You can modify the values of `x`, `y`, and `size` to change the position and size of the square, and you can adjust the border, paper, and ink colors by changing the numbers in the `BORDER`, `PAPER`, and `INK` commands.

    • @cprince10
      @cprince10 8 หลายเดือนก่อน

      It's more of a trapezium than a box, but I'll give this a go, thanks.

    • @nicadi2005
      @nicadi2005 หลายเดือนก่อน

      @@byteforever7829 The colours you are setting using the BORDER, PAPER and INK instructions (by definition, "commands"' are BASIC statements run directly from the prompt, while "instructions" are statements which are part of a program - otherwise, they can very well be) apply to the entire screen, not just the square box you are about to draw... *Just checking here: Was that your original intention?*
      Also, your 4no. PLOT instructions only have the effect of slowly drawing (because it's done pixel by pixel) only the contour of that square box, NOT the interior as well. There is a 'bug' in there as well, affecting the lower-left corner of the box (which is not being drawn at all, as none of the PLOTs ever get the coordinates {x, y}) and the upper-right one too (which is being drawn twice, as for the last cycle where i = size, the PLOTs on lines 110 &120 are exactly identical)... 😊

    • @nicadi2005
      @nicadi2005 หลายเดือนก่อน +1

      @cprince10 "Great video. If I draw a box using Plot and Draw, how do I fill in the box with colour?" - Right... You're probably not going to like this, but the truth is there are no 'easy' or 'straightforward' answers to your query; it all depends on what exactly your intentions are (meaning, what you're trying to achieve or what the end result should be), what tools you are considering for use, and ("last but not least", as they say) what compromises you are willing to make...
      The first thing you will need to understand when working with colourful graphics on the 'vanilla' ZX Spectrum, is that it's not possible to control the colours of individual pixels on screen. You see, the Speccy has quite a unique way of handling colours... 😉

    • @cprince10
      @cprince10 หลายเดือนก่อน

      @@nicadi2005 It's a football pitch viewed from the side, so obviously I would like it to be green. As it is, the pitch is whatever the Paper colour is. I don't have much memory to play with either so I'm guessing it's not achievable.

  • @peter486
    @peter486 10 หลายเดือนก่อน

    can you show usa the old tool for making games?, always wanted to know how they did it

    • @byteforever7829
      @byteforever7829  10 หลายเดือนก่อน +1

      I m not sure what they used back in the 1980s. I imagine it was more more advanced than entering machine code manually like in this video. It could be done but an assembler would be better. Recently people have written game engines for the zx spectrum

    • @freedomvigilant1234
      @freedomvigilant1234 6 หลายเดือนก่อน +2

      Matthew Smith used to write assembler on a TRS-80 and then pop it over to a ZX Spectrum with an interface he built on a veroboard.
      David Jones also utilised a TRS-80 as a development machine.
      Imagine used very expensive Sage IV computers as development machines.
      Design Design utilised an in house development machine built on veroboard and developed all their own tools in house.

    • @Innesb
      @Innesb 6 หลายเดือนก่อน

      @@freedomvigilant1234I was just about to reply to the 3 month-old comment, but you beat me by 11 hours! I was lucky enough to have a TRS-80 when I was in my early teens, but not dedicated enough to write machine code (and I didn’t have access to the resources in those days). I did learn to code in BASIC though; apparently, the manual that accompanied the TRS-80 was renowned for being excellent for beginners. I also learnt how to use VisiCalc, which is generally recognised as being the first spreadsheet application for desktop computers. It set me up for life, and I’m still in IT now. My first job in IT in the late 80s was as a ‘Spreadsheet Programmer’.

  • @nicadi2005
    @nicadi2005 หลายเดือนก่อน

    Why not just LDIR your way through this?

  • @syrus3k
    @syrus3k 5 หลายเดือนก่อน

    This is so much more horrid than asm!