Assigned several unimplemented/unused kernel functions as stubs, so that we know when they're used and how they're called
svn-id: r42170
This commit is contained in:
parent
bceacbd922
commit
87988c69ee
3 changed files with 20 additions and 13 deletions
|
@ -309,7 +309,7 @@ SciKernelFunction kfunct_mappers[] = {
|
|||
/*6f*/ DEFUN("6f", kTimesCos, "ii"),
|
||||
/*70*/ DEFUN("Graph", kGraph, ".*"),
|
||||
/*71*/ DEFUN("Joystick", kJoystick, ".*"),
|
||||
/*72*/ NOFUN("unknown72"),
|
||||
/*72*/ NOFUN("unknown72"), // ShiftScreen, perhaps?
|
||||
/*73*/ NOFUN("unknown73"),
|
||||
|
||||
// Experimental functions
|
||||
|
@ -322,7 +322,6 @@ SciKernelFunction kfunct_mappers[] = {
|
|||
/*(?)*/ DEFUN("IsItSkip", kIsItSkip, "iiiii"),
|
||||
|
||||
// Non-experimental Functions without a fixed ID
|
||||
|
||||
DEFUN("CosMult", kTimesCos, "ii"),
|
||||
DEFUN("SinMult", kTimesSin, "ii"),
|
||||
/*(?)*/ DEFUN("CosDiv", kCosDiv, "ii"),
|
||||
|
@ -341,6 +340,21 @@ SciKernelFunction kfunct_mappers[] = {
|
|||
// Special and NOP stuff
|
||||
{NULL, k_Unknown, NULL},
|
||||
|
||||
// Stub functions
|
||||
DEFUN("ShiftScreen", kStub, ".*"),
|
||||
DEFUN("MemorySegment", kStub, ".*"),
|
||||
DEFUN("ListOps", kStub, ".*"),
|
||||
DEFUN("ATan", kStub, ".*"),
|
||||
DEFUN("StrSplit", kStub, ".*"),
|
||||
DEFUN("MergePoly", kStub, ".*"),
|
||||
DEFUN("AssertPalette", kStub, ".*"),
|
||||
DEFUN("TextColors", kStub, ".*"),
|
||||
DEFUN("TextFonts", kStub, ".*"),
|
||||
DEFUN("Record", kStub, ".*"),
|
||||
DEFUN("PlayBack", kStub, ".*"),
|
||||
DEFUN("DbugStr", kStub, ".*"),
|
||||
DEFUN("Platform", kStub, ".*"), // SCI1
|
||||
|
||||
{NULL, NULL, NULL} // Terminator
|
||||
};
|
||||
|
||||
|
@ -779,11 +793,6 @@ void Kernel::setDefaultKernelNames() {
|
|||
offset = 4;
|
||||
}
|
||||
}
|
||||
|
||||
if (_resmgr->_sciVersion == SCI_VERSION_1_1) {
|
||||
// KQ6CD calls unimplemented function 0x26
|
||||
_kernelNames[0x26] = "Dummy";
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ENABLE_SCI32
|
||||
|
|
|
@ -509,12 +509,10 @@ reg_t kSetVideoMode(EngineState *s, int funct_nr, int argc, reg_t *argv);
|
|||
reg_t k_Unknown(EngineState *s, int funct_nr, int argc, reg_t *argv);
|
||||
|
||||
// The Unknown/Unnamed kernel function
|
||||
reg_t kstub(EngineState *s, int funct_nr, int argc, reg_t *argv);
|
||||
reg_t kStub(EngineState *s, int funct_nr, int argc, reg_t *argv);
|
||||
// for unimplemented kernel functions
|
||||
reg_t kNOP(EngineState *s, int funct_nr, int argc, reg_t *argv);
|
||||
// for kernel functions that don't do anything
|
||||
reg_t kFsciEmu(EngineState *s, int funct_nr, int argc, reg_t *argv);
|
||||
// Emulating "old" kernel functions on the heap
|
||||
|
||||
|
||||
} // End of namespace Sci
|
||||
|
|
|
@ -237,9 +237,9 @@ reg_t kMemory(EngineState *s, int funct_nr, int argc, reg_t *argv) {
|
|||
return s->r_acc;
|
||||
}
|
||||
|
||||
reg_t kstub(EngineState *s, int funct_nr, int argc, reg_t *argv) {
|
||||
reg_t kStub(EngineState *s, int funct_nr, int argc, reg_t *argv) {
|
||||
char tmpbuf[200];
|
||||
sprintf(tmpbuf, "Unimplemented syscall: %s[%x](",
|
||||
sprintf(tmpbuf, "Unimplemented syscall: %s[%x] (",
|
||||
s->_kernel->getKernelName(funct_nr).c_str(), funct_nr);
|
||||
|
||||
for (int i = 0; i < argc; i++) {
|
||||
|
@ -249,7 +249,7 @@ reg_t kstub(EngineState *s, int funct_nr, int argc, reg_t *argv) {
|
|||
strcat(tmpbuf2, ", ");
|
||||
strcat(tmpbuf, tmpbuf2);
|
||||
}
|
||||
strcat(tmpbuf, ")\n");
|
||||
strcat(tmpbuf, ")");
|
||||
|
||||
warning(tmpbuf);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue