ppu

package
v0.0.0-...-859ef25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2019 License: GPL-3.0-or-later Imports: 8 Imported by: 0

Documentation

Overview

Copyright 2014, 2015 Jonathan da Silva SAntos

This file is part of Alphanes.

Alphanes is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Alphanes is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Alphanes.  If not, see <http://www.gnu.org/licenses/>.

This file is part of Alphanes.

Alphanes is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Alphanes is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Alphanes.  If not, see <http://www.gnu.org/licenses/>.

This file is part of Alphanes.

Alphanes is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Alphanes is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Alphanes.  If not, see <http://www.gnu.org/licenses/>.

This file is part of Alphanes.

Alphanes is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Alphanes is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Alphanes.  If not, see <http://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bit0

func Bit0(input byte) byte

func Bit1

func Bit1(input byte) byte

func Bit2

func Bit2(input byte) byte

func Bit3

func Bit3(input byte) byte

func Bit4

func Bit4(input byte) byte

func Bit5

func Bit5(input byte) byte

func Bit6

func Bit6(input byte) byte

func Bit7

func Bit7(input byte) byte

func ClearVBLANK

func ClearVBLANK(ppu *PPU)

func H

func H(value uint16) byte

func L

func L(value uint16) byte

func LE

func LE(a byte, b byte) uint16

func Process

func Process(ppu *PPU, cart *cartridge.Cartridge)

func READ_SCREEN

func READ_SCREEN(ppu *PPU, x int, y int) int

func ReadBit

func ReadBit(input byte, pos byte) byte

func ReadPPURam

func ReadPPURam(ppu *PPU, addr uint16) byte

func SetBit

func SetBit(input byte, pos byte, value byte) byte
func SetBit(input *byte, pos byte, value byte ) {
	if value == 1 {
		*input |= 1 << pos
	} else {
		*input &= ^(1 << pos)
	}
}

func SetVBLANK

func SetVBLANK(ppu *PPU)

func ShowScreen

func ShowScreen(ppu *PPU)

func WRITE_SCREEN

func WRITE_SCREEN(ppu *PPU, x int, y int, k int)

Types

type PPU

type PPU struct {
	SCREEN_DATA []int

	Name     string
	CYC      int
	SCANLINE int
	D        *debug.PPUDebug

	ATTR      byte
	HIGH_TILE byte
	LOW_TILE  byte

	VISIBLE_SCANLINE bool

	IO *ioports.IOPorts
}

func StartPPU

func StartPPU(IO *ioports.IOPorts) PPU

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL