|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.razvan.jzx.BaseLoader
public abstract class BaseLoader
Base class extended by all classes that can load information from a saved file format into the Spectrum.
This class provides basic, common loader functionality for the various loader types.
The BaseLoader class provides methods for retrieving the data that was loaded. The actual loading code, parsing of the file format etc. is performed in child classes. The BaseLoader class is implemented (almost) as Visitor pattern, whereby it is passed into all the components of the Spectrum tree, and each component retrieves from it the data that is relevant to that component.
Field Summary | |
---|---|
protected int |
m_af16
Z80 basic registers. |
protected int |
m_af16alt
Z80 alternate registers. |
protected int |
m_bc16
Z80 basic registers. |
protected int |
m_bc16alt
Z80 alternate registers. |
protected int |
m_border
Border color. |
protected int |
m_de16
Z80 basic registers. |
protected int |
m_de16alt
Z80 alternate registers. |
protected int |
m_hl16
Z80 basic registers. |
protected int |
m_hl16alt
Z80 alternate registers. |
protected int |
m_i8
Z80 interrupt and refresh registers. |
protected int |
m_iff1a
Z80 flip-flops. |
protected int |
m_iff1b
Z80 flip-flops. |
protected int |
m_im2
Z80 interrupt mode. |
protected int |
m_issue
Spectrum model (issue). |
protected int |
m_ix16
Z80 index registers. |
protected int |
m_iy16
Z80 index registers. |
protected int |
m_last0x7ffd
128k specific saved I/O registers. |
protected int |
m_last0xfffd
|
protected ILogger |
m_logger
Logger object for logging messages and exceptions. |
protected org.razvan.jzx.SnapshotMemory |
m_memory
"headless" memory object that stores the memory image. |
protected int |
m_mode
Spectrum model (MODE_48 or MODE_128). |
protected int |
m_pc16
Z80 core registers. |
protected int |
m_r8
Z80 interrupt and refresh registers. |
protected int |
m_sp16
Z80 core registers. |
protected java.net.URL |
m_url
URL used for loading the data. |
static int |
MODE_128
128k Spectrum model data |
static int |
MODE_48
48k Spectrum model data |
Constructor Summary | |
---|---|
BaseLoader(ILogger logger,
java.net.URL url)
Setup the logger and url, allocate and initialize the "headless" memory object. |
Method Summary | |
---|---|
int |
getAF16()
|
int |
getAF16ALT()
|
int |
getBC16()
|
int |
getBC16ALT()
|
int |
getBorder()
|
int |
getDE16()
|
int |
getDE16ALT()
|
int |
getHL16()
|
int |
getHL16ALT()
|
int |
getI8()
|
int |
getIFF1a()
|
int |
getIFF1b()
|
int |
getIM2()
|
int |
getIssue()
|
int |
getIX16()
|
int |
getIY16()
|
int |
getLast0x7ffd()
|
int |
getLast0xfffd()
|
BaseMemory |
getMemory()
Trivial accessor for the (headless) memory object. |
int |
getMode()
|
int |
getPC16()
|
int |
getR8()
|
int |
getSP16()
|
abstract void |
load(java.lang.String name)
Perform the actual loading from the URL fragment identified by the "name" parameter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MODE_48
public static final int MODE_128
protected int m_af16
protected int m_bc16
protected int m_de16
protected int m_hl16
protected int m_af16alt
protected int m_bc16alt
protected int m_de16alt
protected int m_hl16alt
protected int m_ix16
protected int m_iy16
protected int m_sp16
protected int m_pc16
protected int m_r8
protected int m_i8
protected int m_im2
protected int m_iff1a
protected int m_iff1b
protected int m_mode
protected int m_issue
protected int m_border
protected int m_last0x7ffd
protected int m_last0xfffd
protected org.razvan.jzx.SnapshotMemory m_memory
BaseMemory
protected java.net.URL m_url
protected ILogger m_logger
Constructor Detail |
---|
public BaseLoader(ILogger logger, java.net.URL url)
Method Detail |
---|
public int getAF16()
public int getBC16()
public int getDE16()
public int getHL16()
public int getAF16ALT()
public int getBC16ALT()
public int getDE16ALT()
public int getHL16ALT()
public int getIX16()
public int getIY16()
public int getSP16()
public int getPC16()
public int getR8()
public int getI8()
public int getIM2()
public int getIFF1a()
public int getIFF1b()
public int getMode()
public int getIssue()
public int getBorder()
public int getLast0x7ffd()
public int getLast0xfffd()
public BaseMemory getMemory()
public abstract void load(java.lang.String name) throws java.io.IOException
name
- The URL fragment that is combined with
the URL specified in the constructor in order to
fully specify the URL for the file from which
to load the data.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |