Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Libretro
SquirrelJME
Commits
43f1a7c1
Commit
43f1a7c1
authored
Dec 28, 2019
by
Stephanie Gawroriski
Browse files
Store memory and the profiler into the machine state, will later be captured by OOB calls.
parent
2590c64e
Changes
2
Hide whitespace changes
Inline
Side-by-side
runt/libs/summercoat-vm/cc/squirreljme/vm/summercoat/MachineState.java
View file @
43f1a7c1
...
...
@@ -9,6 +9,8 @@
package
cc.squirreljme.vm.summercoat
;
import
net.multiphasicapps.profiler.ProfilerSnapshot
;
/**
* This contains the machine state.
*
...
...
@@ -16,9 +18,33 @@ package cc.squirreljme.vm.summercoat;
*/
public
final
class
MachineState
{
/** The virtual machine memory. */
protected
final
WritableMemory
memory
;
/** The profiler snapshot to write to. */
protected
final
ProfilerSnapshot
profiler
;
/** Was the supervisor okay? */
private
volatile
boolean
_supervisorokay
;
/**
* Initializes the machine state.
*
* @param __mem The memory state.
* @param __pf The profiler, this is optional.
* @throws NullPointerException If no memory was specified.
* @since 2019/12/28
*/
public
MachineState
(
WritableMemory
__mem
,
ProfilerSnapshot
__pf
)
throws
NullPointerException
{
if
(
__mem
==
null
)
throw
new
NullPointerException
(
"NARG"
);
this
.
memory
=
__mem
;
this
.
profiler
=
__pf
;
}
/**
* Flags that the supervisor booted okay.
*
...
...
runt/libs/summercoat-vm/cc/squirreljme/vm/summercoat/SummerCoatFactory.java
View file @
43f1a7c1
...
...
@@ -371,7 +371,7 @@ public class SummerCoatFactory
}
// Setup non-cpu VM state
MachineState
ms
=
new
MachineState
();
MachineState
ms
=
new
MachineState
(
vmem
,
__ps
);
// Setup virtual execution CPU
NativeCPU
cpu
=
new
NativeCPU
(
ms
,
vmem
,
0
,
__ps
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment