/** * This is called on completion of a VDI Trap workstation open, * to modify the return structure for extended resolutions. */ void VDI_Complete(void) { /* right opcode? */ assert(VDI_isWorkstationOpen(VDIOpCode)); /* not changed between entry and completion? */ assert(VDIOpCode == STMemory_ReadWord(VDIControl)); STMemory_WriteWord(VDIIntout, VDIWidth-1); /* IntOut[0] Width-1 */ STMemory_WriteWord(VDIIntout+1*2, VDIHeight-1); /* IntOut[1] Height-1 */ STMemory_WriteWord(VDIIntout+13*2, VDIColors); /* IntOut[13] #colors */ STMemory_WriteWord(VDIIntout+39*2, 512); /* IntOut[39] #available colors */ STMemory_WriteWord(LineABase-0x15a*2, VDIWidth-1); /* WKXRez */ STMemory_WriteWord(LineABase-0x159*2, VDIHeight-1); /* WKYRez */ VDI_LineA(LineABase, FontBase); /* And modify Line-A structure accordingly */ }
/** * This function will be called at system init by the cartridge routine * (after gemdos init, before booting floppies). * The GEMDOS vector (#$84) is setup and we also initialize the connected * drive mask and Line-A variables (for an extended VDI resolution) from here. */ unsigned long OpCode_SysInit(uae_u32 opcode) { /* Add any drives mapped by TOS in the interim */ ConnectedDriveMask |= STMemory_ReadLong(0x4c2); /* Initialize the connected drive mask */ STMemory_WriteLong(0x4c2, ConnectedDriveMask); if (!bInitGemDOS) { /* Init on boot - see cart.c */ GemDOS_Boot(); /* Update LineA for extended VDI res * D0: LineA base, A1: Font base */ VDI_LineA(regs.regs[0], regs.regs[9]); } CpuDoNOP (); return 4; }