Videopac / Odyssey2 forum
November 22, 2019, 09:06:28 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Join Rafael's Haunted Woods contest and win a copy of the game!
 
   Home   arcade Help Login Register links videopac.nl  
Pages: [1]   Go Down
  Print  
Author Topic: O2 Grid Map: Grid Explained!  (Read 2683 times)
Gorf
Attacked the Timelord
***
Posts: 185


Gorfians take no prisoners!


« on: January 30, 2009, 07:57:16 PM »

I hope this qualifies as homebrew info at least. I figured I'd
make a chart


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!

Logged
Janzl
Administrator
I'd sell my mother for a Videopac
*****
Posts: 2329


I now can cross that bloody street...


facebook@janzl.com
WWW
« Reply #1 on: January 31, 2009, 09:15:17 AM »

Great info Gorf, thanks!

Could you maybe also add a bit of sample code for generating a grid. With an example of the generated grid.

Thanks again!
Logged

Ne tirez pas sur le administrator!
Gorf
Attacked the Timelord
***
Posts: 185


Gorfians take no prisoners!


« Reply #2 on: January 31, 2009, 08:42:52 PM »

Great info Gorf, thanks!

Could you maybe also add a bit of sample code for generating a grid. With an example of the generated grid.

Thanks again!

Um.......that was the last post. Smiley
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!