MCPcopy Create free account
hub / github.com/fogleman/nes / Load

Method Load

nes/ppu.go:137–183  ·  view source on GitHub ↗
(decoder *gob.Decoder)

Source from the content-addressed store, hash-verified

135}
136
137func (ppu *PPU) Load(decoder *gob.Decoder) error {
138 decoder.Decode(&ppu.Cycle)
139 decoder.Decode(&ppu.ScanLine)
140 decoder.Decode(&ppu.Frame)
141 decoder.Decode(&ppu.paletteData)
142 decoder.Decode(&ppu.nameTableData)
143 decoder.Decode(&ppu.oamData)
144 decoder.Decode(&ppu.v)
145 decoder.Decode(&ppu.t)
146 decoder.Decode(&ppu.x)
147 decoder.Decode(&ppu.w)
148 decoder.Decode(&ppu.f)
149 decoder.Decode(&ppu.register)
150 decoder.Decode(&ppu.nmiOccurred)
151 decoder.Decode(&ppu.nmiOutput)
152 decoder.Decode(&ppu.nmiPrevious)
153 decoder.Decode(&ppu.nmiDelay)
154 decoder.Decode(&ppu.nameTableByte)
155 decoder.Decode(&ppu.attributeTableByte)
156 decoder.Decode(&ppu.lowTileByte)
157 decoder.Decode(&ppu.highTileByte)
158 decoder.Decode(&ppu.tileData)
159 decoder.Decode(&ppu.spriteCount)
160 decoder.Decode(&ppu.spritePatterns)
161 decoder.Decode(&ppu.spritePositions)
162 decoder.Decode(&ppu.spritePriorities)
163 decoder.Decode(&ppu.spriteIndexes)
164 decoder.Decode(&ppu.flagNameTable)
165 decoder.Decode(&ppu.flagIncrement)
166 decoder.Decode(&ppu.flagSpriteTable)
167 decoder.Decode(&ppu.flagBackgroundTable)
168 decoder.Decode(&ppu.flagSpriteSize)
169 decoder.Decode(&ppu.flagMasterSlave)
170 decoder.Decode(&ppu.flagGrayscale)
171 decoder.Decode(&ppu.flagShowLeftBackground)
172 decoder.Decode(&ppu.flagShowLeftSprites)
173 decoder.Decode(&ppu.flagShowBackground)
174 decoder.Decode(&ppu.flagShowSprites)
175 decoder.Decode(&ppu.flagRedTint)
176 decoder.Decode(&ppu.flagGreenTint)
177 decoder.Decode(&ppu.flagBlueTint)
178 decoder.Decode(&ppu.flagSpriteZeroHit)
179 decoder.Decode(&ppu.flagSpriteOverflow)
180 decoder.Decode(&ppu.oamAddress)
181 decoder.Decode(&ppu.bufferedData)
182 return nil
183}
184
185func (ppu *PPU) Reset() {
186 ppu.Cycle = 340

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected