Comments.

This commit is contained in:
Ben Vanik 2014-01-12 14:43:59 -08:00
parent 6129e1eb7a
commit eb5d7e0f31
2 changed files with 4 additions and 2 deletions

View File

@ -491,6 +491,8 @@ int Translate_DEBUG_BREAK_TRUE(TranslationContext& ctx, Instr* i) {
}
uint32_t IntCode_TRAP(IntCodeState& ics, const IntCode* i) {
// 0x0FE00014 is a 'debug print' where r3 = buffer r4 = length
// TODO(benvanik): post software interrupt to debugger.
__debugbreak();
return IA_NEXT;
}

View File

@ -147,10 +147,10 @@ int XexModule::SetupLibraryImports(const xe_xex2_import_library_t* library) {
} else {
if (kernel_export->is_implemented) {
// Implemented - replace with pointer.
*slot = XESWAP32BE(kernel_export->variable_ptr);
XESETUINT32BE(slot, kernel_export->variable_ptr);
} else {
// Not implemented - write with a dummy value.
*slot = XESWAP32BE(0xD000BEEF | (kernel_export->ordinal & 0xFFF) << 16);
XESETUINT32BE(slot, 0xD000BEEF | (kernel_export->ordinal & 0xFFF) << 16);
XELOGCPU("WARNING: imported a variable with no value: %s",
kernel_export->name);
}