Class: Zemu::Config::ROM
- Inherits:
-
Memory
- Object
- Zemu::ConfigObject
- BusDevice
- Memory
- Zemu::Config::ROM
- Defined in:
- lib/zemu/config.rb
Overview
Read-Only Memory object
Represents a block of memory which is read-only.
Instance Method Summary collapse
-
#initialize ⇒ ROM
constructor
Constructor.
-
#mem_write(addr, port) ⇒ Object
Memory write handler.
-
#readonly? ⇒ Boolean
Is this memory block readonly?.
Methods inherited from Memory
#contents, #from_binary, #mem_read, #memory, #params
Methods inherited from BusDevice
#clock, #functions, #interrupt, #interrupt?, #io_read, #io_write, #mem_read, #memory, #nmi, #nmi?, #params, #when_setup
Methods inherited from Zemu::ConfigObject
Constructor Details
#initialize ⇒ ROM
Constructor.
Takes a block in which the parameters of the memory block can be initialized.
All parameters can be set within this block. They become readonly as soon as the block completes.
316 317 318 |
# File 'lib/zemu/config.rb', line 316 def initialize super end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Zemu::ConfigObject
Instance Method Details
#mem_write(addr, port) ⇒ Object
Memory write handler.
326 327 328 |
# File 'lib/zemu/config.rb', line 326 def mem_write(addr, port) # Does nothing - cannot write to read-only memory. end |
#readonly? ⇒ Boolean
Is this memory block readonly?
321 322 323 |
# File 'lib/zemu/config.rb', line 321 def readonly? true end |