aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/dc/dcmain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform/dc/dcmain.cpp')
-rw-r--r--backends/platform/dc/dcmain.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/backends/platform/dc/dcmain.cpp b/backends/platform/dc/dcmain.cpp
index 47bfb0c15d..06738a687d 100644
--- a/backends/platform/dc/dcmain.cpp
+++ b/backends/platform/dc/dcmain.cpp
@@ -41,20 +41,21 @@ const char *gGameName;
OSystem_Dreamcast::OSystem_Dreamcast()
: _devpoll(0), screen(NULL), mouse(NULL), overlay(NULL), _softkbd(this),
- _ms_buf(NULL), _timer(NULL), _mixer(NULL), _savefile(NULL),
+ _ms_buf(NULL), _mixer(NULL),
_current_shake_pos(0), _aspect_stretch(false), _softkbd_on(false),
_softkbd_motion(0), _enable_cursor_palette(false), _screenFormat(0)
{
memset(screen_tx, 0, sizeof(screen_tx));
memset(mouse_tx, 0, sizeof(mouse_tx));
memset(ovl_tx, 0, sizeof(ovl_tx));
+ _fsFactory = this;
}
void OSystem_Dreamcast::initBackend()
{
ConfMan.setInt("autosave_period", 0);
- _savefile = createSavefileManager();
- _timer = new DefaultTimerManager();
+ _savefileManager = createSavefileManager();
+ _timerManager = new DefaultTimerManager();
uint sampleRate = initSound();
_mixer = new Audio::MixerImpl(this, sampleRate);
@@ -62,7 +63,7 @@ void OSystem_Dreamcast::initBackend()
_audiocdManager = new DCCDManager();
- BaseBackend::initBackend();
+ EventsBaseBackend::initBackend();
}
@@ -233,7 +234,7 @@ void OSystem_Dreamcast::logMessage(LogMessageType::Type type, const char *messag
namespace DC_Flash {
static int syscall_info_flash(int sect, int *info)
{
- return (*(int (**)(int, void*, int, int))0x8c0000b8)(sect,info,0,0);
+ return (*(int (**)(int, void*, int, int))0x8c0000b8)(sect,info,0,0);
}
static int syscall_read_flash(int offs, void *buf, int cnt)
@@ -254,24 +255,24 @@ namespace DC_Flash {
}
return (unsigned short)~n;
}
-
+
static int flash_read_sector(int partition, int sec, unsigned char *dst)
{
int s, r, n, b, bmb, got=0;
int info[2];
char buf[64];
char bm[64];
-
+
if((r = syscall_info_flash(partition, info))<0)
return r;
-
+
if((r = syscall_read_flash(info[0], buf, 64))<0)
return r;
-
+
if(memcmp(buf, "KATANA_FLASH", 12) ||
buf[16] != partition || buf[17] != 0)
return -2;
-
+
n = (info[1]>>6)-1-((info[1] + 0x7fff)>>15);
bmb = n+1;
for(b = 0; b < n; b++) {