mirror of
https://github.com/colby-swandale/waterfoul
synced 2024-12-26 21:58:54 +01:00
renamed GPU to PPU
This commit is contained in:
parent
ca36ba9bfd
commit
432f869c4e
4 changed files with 8 additions and 12 deletions
|
@ -9,7 +9,7 @@ require "waterfoul/cpu"
|
|||
require "waterfoul/errors"
|
||||
require "waterfoul/sdl"
|
||||
require "waterfoul/screen"
|
||||
require "waterfoul/gpu"
|
||||
require "waterfoul/ppu"
|
||||
require "waterfoul/cartridge"
|
||||
require "waterfoul/emulator"
|
||||
require "waterfoul/input"
|
||||
|
|
|
@ -10,7 +10,7 @@ module Waterfoul
|
|||
@cartridge = Cartridge.new rom
|
||||
@cpu = CPU.new
|
||||
@cpu = SkipBoot.set_state(@cpu) if options.has_key?('skip_boot')
|
||||
@gpu = GPU.new
|
||||
@ppu = PPU.new
|
||||
@screen = Screen.new
|
||||
end
|
||||
|
||||
|
@ -18,8 +18,8 @@ module Waterfoul
|
|||
$mmu.cartridge = @cartridge
|
||||
loop do
|
||||
@cpu.step
|
||||
@gpu.step @cpu.m
|
||||
@screen.render @gpu.framebuffer if @gpu.vblank?
|
||||
@ppu.step @cpu.m
|
||||
@screen.render @ppu.framebuffer if @ppu.vblank?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
module Waterfoul
|
||||
module Helper
|
||||
|
||||
def pop_from_stack(word = true)
|
||||
if word
|
||||
lower = $mmu.read_byte @sp
|
||||
@sp += 1
|
||||
upper = $mmu.read_byte @sp
|
||||
@sp += 1
|
||||
|
||||
(upper << 8) | lower
|
||||
val = $mmu.read_word @sp
|
||||
@sp += 2
|
||||
val
|
||||
else
|
||||
val = $mmu.read_byte @sp
|
||||
@sp += 1
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'waterfoul/io/lcd_control'
|
||||
|
||||
module Waterfoul
|
||||
class GPU
|
||||
class PPU
|
||||
include Helper
|
||||
|
||||
attr_accessor :mode
|
Loading…
Reference in a new issue