Previous 15994 Revisions Next

r1064 Tuesday 2nd October, 2007 at 21:04:49 UTC by Wilbert Pol
[GAMEBOY] Added a bit more documentation.
[src/mess/drivers]gb.c

src/mess/drivers/gb.c
r1063r1064
100100
101101
102102
103Around lines 152-153-0 the picture becomes as follows:
104STAT:
10511111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111
10611111111 11111111 11111111 15555555 55555555 55555555 55555555 55555555 55555555 55555555
10755555555 55555555 55555555 55555555 55555555 55555555 55555555 55111111 11111111 11111111
10811111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111
10911111111 11110222 22222222 22222222 23333333 33333333 33333333 33333333 33333333
110
111  LY:
11277777777 77777777 77777777 77777777 77777777 77777777 77777777 77777777 77777777 77777777
11377777777 77777777 77777777 88888888 88888888 88888888 88888888 88888888 88888888 88888888
11488888888 88888888 88888888 88888888 88888888 88888888 88888888 88900000 00000000 00000000
11500000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
11600000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
117
118
119
120The full STAT/LY value state machine.
121=====================================
122
123For STAT we only show the lower 3 bits and for LY only the lower 5 bits of the full
124register. Each digit stands for 4 clock cycles (the smallest measurable unit on a
125dmg or mgb). When the video hardware is switched on the LY register is set 0 and
126the STAT mode is 0. The values for STAT and LY will change as follows:
127
128STAT 000000000000000000003333333333333333333333333333333333333333333000000000000000000000000000000000000000000000000000
129  LY 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001  line #0
130     ^LY=LYC bit can get set here                                                             LY=LYC bit is reset here^
131
132STAT 222222222222222222223333333333333333333333333333333333333333333000000000000000000000000000000000000000000000000000
133  LY 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112  line #1
134
135     :
136     :
137
138STAT 222222222222222222223333333333333333333333333333333333333333333000000000000000000000000000000000000000000000000000
139  LY FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0  line #143
140
141STAT 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
142  LY 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001  line #144
143
144     :
145     :
146
147STAT 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
148  LY 888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888889  line #152
149
150STAT 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110
151  LY 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000  line #153
152     ^
153     LY=LYC interrupt for 153 can get triggered here
154
155STAT 222222222222222222223333333333333333333333333333333333333333333000000000000000000000000000000000000000000000000000
156  LY 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001  line #0
157
158STAT 222222222222222222223333333333333333333333333333333333333333333000000000000000000000000000000000000000000000000000
159  LY 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112  line #1
160
161     :
162     etc
163
164
103165Mappers used in the gameboy
104166===========================
105167

Previous 15994 Revisions Next


© 1998-2018 The MESS Team