class Rnes::PartsFactory
Constants
- CHARACTER_RAM_BYTESIZE
- VIDEO_RAM_BYTESIZE
- WORKING_RAM_BYTESIZE
Public Instance Methods
character_ram()
click to toggle source
@return [Rnes::Ram]
# File lib/rnes/parts_factory.rb, line 21 def character_ram @character_ram ||= ::Rnes::Ram.new(bytesize: CHARACTER_RAM_BYTESIZE) end
cpu()
click to toggle source
@return [Rnes::Cpu]
# File lib/rnes/parts_factory.rb, line 26 def cpu @cpu ||= ::Rnes::Cpu.new( bus: cpu_bus, interrupt_line: interrupt_line, ) end
cpu_bus()
click to toggle source
@return [Rnes::CpuBus]
# File lib/rnes/parts_factory.rb, line 34 def cpu_bus @cpu_bus ||= ::Rnes::CpuBus.new( dma_controller: dma_controller, keypad1: keypad1, keypad2: keypad2, ppu: ppu, ram: working_ram, ) end
dma_controller()
click to toggle source
@return [Rnes::DmaController]
# File lib/rnes/parts_factory.rb, line 45 def dma_controller @dma_controller ||= ::Rnes::DmaController.new( ppu: ppu, working_ram: working_ram, ) end
interrupt_line()
click to toggle source
@return [Rnes::InterruptLine]
# File lib/rnes/parts_factory.rb, line 53 def interrupt_line @interrupt_line ||= ::Rnes::InterruptLine.new end
keypad1()
click to toggle source
@return [Rnes::Keypad]
# File lib/rnes/parts_factory.rb, line 58 def keypad1 @keypad1 ||= ::Rnes::Keypad.new end
keypad2()
click to toggle source
@return [Rnes::Keypad]
# File lib/rnes/parts_factory.rb, line 63 def keypad2 @keypad2 ||= ::Rnes::Keypad.new end
ppu()
click to toggle source
@return [Rnes::Ppu]
# File lib/rnes/parts_factory.rb, line 68 def ppu @ppu ||= ::Rnes::Ppu.new( bus: ppu_bus, interrupt_line: interrupt_line, renderer: renderer, ) end
ppu_bus()
click to toggle source
@return [Rnes::PpuBus]
# File lib/rnes/parts_factory.rb, line 77 def ppu_bus @ppu_bus ||= ::Rnes::PpuBus.new( character_ram: character_ram, video_ram: video_ram, ) end
renderer()
click to toggle source
@return [Rnes::TerminalRenderer]
# File lib/rnes/parts_factory.rb, line 85 def renderer @renderer ||= ::Rnes::TerminalRenderer.new end
video_ram()
click to toggle source
@return [Rnes::Ram]
# File lib/rnes/parts_factory.rb, line 90 def video_ram @video_ram ||= ::Rnes::Ram.new(bytesize: VIDEO_RAM_BYTESIZE) end
working_ram()
click to toggle source
@return [Rnes::Ram]
# File lib/rnes/parts_factory.rb, line 95 def working_ram @working_ram ||= ::Rnes::Ram.new(bytesize: WORKING_RAM_BYTESIZE) end