Picking apart spectrum screens

edited February 2012 in Sinclair Miscellaneous
Dear all,

Being a fan of remakes, I'm constantly trying to pick apart spectrum game screens to see how they're made up - how many characters one platform is from another, is a tunnel big enough to fit the player sprite, etc.

I don't know how many times I've counted character squares and estimated gaps, so I was wondering, is there a tool out there that will overlay a static game screen pic (it doesn't have to be in-game) with either a 8x8 grid or bright 0/1 squares?

I know I can do it manually by placing screen-grabs in PhotoShop and sticking a layered grid over it, but is there a program like Spin or something that has this built it?

Just wondering.


Toby

EDIT: actually, I know I can adjust photoshop's grid overlay to 8x8, but I'd still like to know if another tool does it.
Post edited by Tobo on

Comments

  • edited February 2012
    Save the screen off and load it into ZX-Paintbrush?
    Joefish
    - IONIAN-GAMES.com -
  • edited February 2012
    Tobo wrote: »
    I don't know how many times I've counted character squares and estimated gaps, so I was wondering, is there a tool out there that will overlay a static game screen pic (it doesn't have to be in-game) with either a 8x8 grid or bright 0/1 squares?

    SevenuP has an 8x8 grid, but ZX-Paintbrush's "Colour Grid" (the button next to zoom factor) seems the best for your needs.
  • edited February 2012
    Create a binary file with 768 bytes with values alternating 56 and 120 16 times, then 120 and 56 16 times, and so on. Then open your game using any emulator which lets you load binary files into RAM on the fly, and open such binary file at address 22528 everytime you want the grid displayed.

    You can create such binary file with a very simple script. You can even create it in your emulator using BASIC.

    Execute this code, let it fill the screen, then export 768 bytes from 22528 into a binary file.
    10 LET i=22528
    20 FOR j=1 TO 12
    30 FOR k=1 TO 16: POKE i,56: LET i=i+1: POKE i,120: LET i=i+1: NEXT k
    40 FOR k=1 TO 16: POKE i,120: LET i=i+1: POKE i,56: LET i=i+1: NEXT k
    50 NEXT j
    60 PAUSE 0
    

    You can do it easily in Spectaculator, don't know about other emulators.
  • edited February 2012
    An SCR file can be loaded into an emulator and overlaid with a grid in a few lines of BASIC, but here's a quicker version - although if there's a lot of black on the screen then an alternating BRIGHT grid doesn't help an awful lot, as can be seen from the example.
    SQUARES:ld   bc,384
            ld   hl,22528
            ld   ix,NEXTRES
    NEXTROW:ld   e,16
    NEXTRES:res  6,(hl)
            inc  hl
    NEXTSET:set  6,(hl)
            inc  hl
            dec  e
            jr   nz,NEXTBC
            bit  6,(ix+1)
            jr   nz,RESSET
    SETRES: set  6,(ix+1)
            res  6,(ix+4)
            jr   SETE16
    RESSET: res  6,(ix+1)
            set  6,(ix+4)
    SETE16: ld   e,16
    NEXTBC: dec  bc
            ld   a,b
            or   c
            jr   nz,NEXTRES
            ret
    
    forestofdoomthegrid.gif
  • edited February 2012
    Tobo wrote: »
    EDIT: actually, I know I can adjust photoshop's grid overlay to 8x8, but I'd still like to know if another tool does it.

    Pro Motion has pretty good grid features (and many others, too). Actually, if you have ever cursed while trying to do any precise pixel art (especially with masks/transparency involved) in PhotoShop or Gimp, you should be in seventh heaven once you get familiar with Pro Motion.

    Patrik
  • edited February 2012
    but here's a quicker version...

    BTW, no need to get fancy with self modifying code - something like this would suffice:
     ld hl,22528
     ld c,12
    loop:
     ld b,16
    l1:
     set 6,(hl)
     inc l
     res 6,(hl)
     inc l
     djnz l1
     ld b,16
    l2:
     res 6,(hl)
     inc l
     set 6,(hl)
     inc hl
     djnz l2
     dec c
     jr nz,loop
     ret
    

    Patrik
  • edited February 2012
    No need to be fast, my proggie was only needed to generate a 768 bytes binary to export out of the emulator and then reload everytime you need to measure characters in the middle of a game (provided the game doesn't redraw all the attribute file in the next frame).

    I mean, I wasn't suggesting to run my code on top of a saved screen, but to use my code to generate the attribute file and export it so you can import it on top of whichever is on the emulator at any time, so you can do it while playing.
  • edited February 2012
    na_th_an wrote: »
    I mean, I wasn't suggesting to run my code on top of a saved screen, but to use my code to generate the attribute file and export it so you can import it on top of whichever is on the emulator at any time, so you can do it while playing.

    That's what I understood too. And indeed the way I've done it many times before. :)
    Website: Tardis Remakes / Mostly remakes of Arcade and ZX Spectrum games.
    My games for the Spectrum: Dingo, The Speccies, The Speccies 2, Vallation, SQIJ.
    Twitter: Sokurah
  • edited February 2012
    Wow - now that's what I called answered.

    Thanks, guys.


    Toby
  • edited February 2012
    Here's a version which dispenses with the self-modifying complication and deals with the problem of black space in a satisfyingly spectacular fashion by flipping the colours on alternate squares. If you're a C5 driver then use na_th_an's version on the left; if you're a loose cannon living on the edge with no thought of tomorrow then use the version on the right. :)
    SQUARES:ld   c,12
            ld   hl,22528
    NEXTROW:ld   b,16
    NEXTRES:res  6,(hl)
            inc  hl
            ld   a,(hl)
            cpl
            res  7,a
            ld   (hl),a
            set  6,(hl)
            inc  hl
            djnz NEXTRES
            ld   b,16
    NEXTSET:ld   a,(hl)
            cpl
            res  7,a
            ld   (hl),a
            set  6,(hl)
            inc  hl
            res  6,(hl)
            inc  hl
            djnz NEXTSET
    NEXTBC: dec  c
            jr   nz,NEXTROW
            ret
    
    forestofdoom_bwgrid.gif forestofdoom_swgrid.gif
Sign In or Register to comment.