/
REFACTORING.txt
72 lines (45 loc) · 2.61 KB
/
REFACTORING.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
About the refactoring in progress
While developing the oncoming 00.018.000 version of the specification, an
important goal with the emulator library became refactoring it so it can get
out of its experimental stage developing into a properly structured library.
The first concerns lie at the RRPGE library itself which in the 00.017.000-00
version can not support proper structuring due to providing direct interfaces
to the internals.
Although the emulator state is defined in the RRPGE specification, an emulator
might not want to realize it as-is, especially not as a monolithic memory
block with global access (contradicting the principle of information
encapsulation).
First and foremost so the emulator library is to be changed to allow for such
decisions while retaining good performance even for debugging.
Technical constraints:
Restructuring in an object-oriented manner would likely cripple parts,
assuming the emulator should be constructed of a composition of objects. This
demands many interfaces compared to what is in place now with no big benefits
(the components won't be reused individually).
The likely goal is only adding encapsulation wherever reasonable to isolate
the components from each other. The object structure will remain monolithic,
however maybe containing sub-structures for the individual components.
Changes:
2015.10.01
Refactoring is mostly complete, the FIFO is notably still there to finish, and
import & export routines of the RRPGE library have to be written. Then the
old state related elements (including the exposed type) may be removed.
2015.08.03
Finalized the PRAM access component with integrating the stall cycles.
For the 00.017.000 version no more refactoring will be done since there are
several changes planned in 00.018.000, which components will be covered then.
2015.08.02
Allocators can be supplied to the library. This allows for encapsulating some
tasks within the library, exposing less of the structure, such as the size of
the emulation object.
The state attach / detact interface is removed, instead supplying a binary
export and import interface. This removes dependency on the internal
structure.
For debugging, memory query and set functions are provided (partially
implemented for now so the basic emulator works outputting some state to the
console).
A state interface is started, hopefully replacing direct access later.
The CPU emulation component was refactored, giving up the non-reentrant
optimization hack, encapsulating its data.
The PRAM access component was partially refactored, the bus access cycle
management still has to be solved in some manner (rrpge_m_info.cys).