-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1b26022
commit c9afa77
Showing
2 changed files
with
53 additions
and
4 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
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,51 @@ | ||
#include <stdio.h> | ||
#include <unistd.h> | ||
#include "vb_set.h" | ||
#include "v810_cpu.h" | ||
#include "replay.h" | ||
|
||
// dummy | ||
#include "vb_dsp.h" | ||
#include "vb_sound.h" | ||
VB_DSPCACHE tDSPCACHE; | ||
void sound_update(uint32_t cycles) {} | ||
void sound_write(int addr, uint16_t val) {} | ||
int drc_handleInterrupts(WORD cpsr, WORD* PC) { return 0; } | ||
void drc_relocTable(void) {} | ||
|
||
int main(int argc, char* argv[]) { | ||
int err; | ||
|
||
if (argc != 2) { | ||
puts("Pass a ROM please"); | ||
return 1; | ||
} | ||
|
||
if (access(argv[1], F_OK) != 0) { | ||
printf("Error: ROM %s doesn't exist\n", argv[1]); | ||
return 1; | ||
} | ||
|
||
setDefaults(); | ||
v810_init(); | ||
replay_init(); | ||
|
||
tVBOpt.ROM_PATH = argv[1]; | ||
|
||
v810_load_init(); | ||
while (true) { | ||
int ret = v810_load_step(); | ||
if (ret < 0) return ret; | ||
if (ret == 100) break; | ||
} | ||
|
||
while (true) { | ||
err = v810_run(); | ||
if (err) { | ||
printf("Error code %d\n", err); | ||
return 1; | ||
} | ||
} | ||
|
||
return 0; | ||
} |