-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented some unimplemented instructions. Implemented MARS Runtime Preset. Added Hello-World test case. Fixed incorrect NPT reference. Implemented Nested Paging for Memory Virtualization. Implemented Cross-Platform (XPF) Core for Windows.
- Loading branch information
Zero Tang
committed
Sep 20, 2020
1 parent
9896d14
commit 309c13a
Showing
20 changed files
with
837 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,7 @@ | |
*.i*86 | ||
*.x86_64 | ||
*.hex | ||
*.bin | ||
|
||
# Debug files | ||
*.dSYM/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
@echo off | ||
|
||
title Compiling mipsivm, Checked Build, 64-Bit Windows (AMD64 Architecture) | ||
echo Project: mipsivm | ||
echo Platform: Universal | ||
echo Preset: Preparation | ||
pause | ||
|
||
mkdir .\bin | ||
mkdir .\bin\compchk_win7x64 | ||
mkdir .\bin\compchk_win7x64\Intermediate | ||
|
||
echo Completed! | ||
pause. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
mipsivm - MIPS Interpreting Virtual Machine | ||
Copyright 2018-2020, Yaotian "Zero" Tang. All rights reserved. | ||
This file defines the development kits for mipsivm project. | ||
This program is distributed in the hope that it will be useful, but | ||
without any warranty (no matter implied warranty or merchantability | ||
or fitness for a particular purpose, etc.). | ||
File Location: /include/devkit.h | ||
*/ | ||
|
||
#include "midef.h" | ||
|
||
#define page_size 0x1000 | ||
#define pfn(x) (x>>12) | ||
|
||
bool mips_init_mars_vm(void* ds,void* ts,u32 ds_size,u32 ts_size,u32 stack_size); | ||
void mips_run_mars_vm(); | ||
|
||
void cdecl sim_printf(const char* format,...); | ||
i32 sim_readint(); | ||
float sim_readfloat(); | ||
double sim_readdouble(); | ||
void sim_readstring(char* string,u32 limit); | ||
char sim_readchar(); | ||
void sim_setseed(u32 seed); | ||
u32 sim_getrand(); | ||
|
||
void* load_section(char* file_path,u32* size); | ||
bool unload_section(void* section); | ||
void* alloc_page(u32 size); | ||
bool free_page(void* address); | ||
void* alloc_mem(u32 size); | ||
bool free_mem(void* address); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
mipsivm - MIPS Interpreting Virtual Machine | ||
Copyright 2018-2020, Yaotian "Zero" Tang. All rights reserved. | ||
This file defines the Runtime VM based on MARS. | ||
This program is distributed in the hope that it will be useful, but | ||
without any warranty (no matter implied warranty or merchantability | ||
or fitness for a particular purpose, etc.). | ||
File Location: /mars.h | ||
*/ | ||
|
||
#include "midef.h" | ||
|
||
#define mips_mars_syscall_print_integer 1 | ||
#define mips_mars_syscall_print_float 2 | ||
#define mips_mars_syscall_print_double 3 | ||
#define mips_mars_syscall_print_string 4 | ||
#define mips_mars_syscall_read_integer 5 | ||
#define mips_mars_syscall_read_float 6 | ||
#define mips_mars_syscall_read_double 7 | ||
#define mips_mars_syscall_read_string 8 | ||
#define mips_mars_syscall_alloc_heap 9 | ||
#define mips_mars_syscall_exit 10 | ||
#define mips_mars_syscall_print_char 11 | ||
#define mips_mars_syscall_read_char 12 | ||
#define mips_mars_syscall_open_file 13 | ||
#define mips_mars_syscall_read_file 14 | ||
#define mips_mars_syscall_write_file 15 | ||
#define mips_mars_syscall_close_file 16 | ||
#define mips_mars_syscall_exit2 17 | ||
#define mips_mars_syscall_time 30 | ||
#define mips_mars_syscall_midi_out 31 | ||
#define mips_mars_syscall_sleep 32 | ||
#define mips_mars_syscall_midi_out_sync 33 | ||
#define mips_mars_syscall_print_hex 34 | ||
#define mips_mars_syscall_print_bin 35 | ||
#define mips_mars_syscall_print_unsigned 36 | ||
#define mips_mars_syscall_set_seed 40 | ||
#define mips_mars_syscall_rnd_int 41 | ||
#define mips_mars_syscall_rnd_int_range 42 | ||
#define mips_mars_syscall_rnd_float 43 | ||
#define mips_mars_syscall_rnd_double 44 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.