Jump to content
IGNORED

O2 Grid sample: Grid explained!


Gorf

Recommended Posts

Here is how the grid works on the O2. You have horizontal bar grid and a vertical bar grid.

 

You have 9x9 rows of horizontal bars and 10H x 8V of vertical bars.

 

Bytes go left to right and bits go top to bottom. each bit represents one

bar of the grid.

 

In the O2 VDC chip, the first 8 horizontal bar bits of each row are stored at bytes $C0-$C8

 

The 9th row of horizontal bar bits are stored at bytes $D0,D8 using only

bit 0 of each byte.

 

The 8 vertical bar bits of each vertical row are stored in bytes $E0-$E9

 

Here is how a complete grid is laid out :

 

bytes =>

0 1 2 3 4 5 6 7 8 9 10

0 _ _ _ _ _ _ _ _ _ _

1|_|_|_|_|_|_|_|_|_| b

2|_|_|_|_|_|_|_|_|_| i

3|_|_|_|_|_|_|_|_|_| t

4|_|_|_|_|_|_|_|_|_| s

5|_|_|_|_|_|_|_|_|_|

6|_|_|_|_|_|_|_|_|_| ||

7|_|_|_|_|_|_|_|_|_| \/

8|_|_|_|_|_|_|_|_|_| (horizontal bit 8 = bit 0 only of $D0-D8)

 

H00 H01 H02 H03 H04 H05 H06 H07 H08

V00 V01 V02 V03 V04 V05 V06 V07 V08 V09

H10 H11 H12 H13 H14 H15 H16 H17 H18

V10 V11 V12 V13 V14 V15 V16 V17 V18 V19

H20 H21 H22 H23 H24 H25 H26 H27 H28

V20 V21 V22 V23 V24 V25 V26 V27 V28 V29

H30 H31 H32 H33 H34 H35 H36 H37 H38

V30 V31 V32 V33 V34 V35 V36 V37 V38 V39

H40 H41 H42 H43 H44 H45 H46 H47 H48

V40 V41 V42 V43 V44 V45 V46 V47 V48 V49

H50 H51 H52 H53 H54 H55 H56 H57 H58

V50 V51 V52 V53 V54 V55 V56 V57 V58 V59

H60 H61 H62 H63 H64 H65 H66 H67 H68

V80 V61 V62 V63 V64 V65 V66 V67 V68 V69

H70 H71 H72 H73 H74 H75 H76 H77 H78

V70 V71 V72 V73 V74 V75 V76 V77 V78 V79

H80 H81 H82 H83 H84 H85 H86 H87 H88

 

each entry shows axis, bit and byte in that order...so

 

Horizontal grid bars:

 

Going across the screen:

H00 = Bit 0 of byte0 (byte $C0)

H01 = Bit 0 of byte1 (byte $C1)

H02 = Bit 0 of byte2 (byte $C2)

..and so on

 

Going down screen:

H00 = Bit 0 of byte0 (byte $C0)

H10 = Bit 1 of byte0 (byte $C0)

H20 = Bit 2 of byte0 (byte $C0)

...

H80 = Bit 0 of byte0+16 (byte $D0)<-last row

...and so forth

 

Vertical grid bars:

 

Going across the screen:

V00 = Bit 0 of byte0 (byte $E0)

V01 = Bit 0 of byte1 (byte $E1)

V02 = Bit 0 of byte2 (byte $E2)

 

Going down screen:

V00 = Bit 0 of byte0 (byte $E0)

V10 = Bit 1 of byte0 (byte $E0)

V20 = Bit 2 of byte0 (byte $E0)

 

Enjoy!

Edited by Gorf
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...