use fixed keyboard buffer start/end for old bioses (ApplePanic booter);
enable PCJr selection Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2421
This commit is contained in:
parent
15455827d9
commit
c1fd235522
2 changed files with 19 additions and 6 deletions
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: dosbox.cpp,v 1.90 2005-11-16 20:27:39 c2woody Exp $ */
|
||||
/* $Id: dosbox.cpp,v 1.91 2005-12-22 20:37:20 c2woody Exp $ */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
@ -179,6 +179,7 @@ static void DOSBOX_RealInit(Section * sec) {
|
|||
else mtype=section->Get_string("machine");
|
||||
if (strcasecmp(mtype,"cga")==0) machine=MCH_CGA;
|
||||
else if (strcasecmp(mtype,"tandy")==0) machine=MCH_TANDY;
|
||||
else if (strcasecmp(mtype,"pcjr")==0) machine=MCH_PCJR;
|
||||
else if (strcasecmp(mtype,"hercules")==0) machine=MCH_HERC;
|
||||
else if (strcasecmp(mtype,"vga")==0) machine=MCH_VGA;
|
||||
else LOG_MSG("DOSBOX:Unknown machine type %s",mtype);
|
||||
|
@ -216,7 +217,7 @@ void DOSBOX_Init(void) {
|
|||
MSG_Add("DOSBOX_CONFIGFILE_HELP",
|
||||
"language -- Select another language file.\n"
|
||||
"memsize -- Amount of memory dosbox has in megabytes.\n"
|
||||
"machine -- The type of machine tries to emulate:hercules,cga,tandy,vga.\n"
|
||||
"machine -- The type of machine tries to emulate:hercules,cga,tandy,pcjr,vga.\n"
|
||||
"captures -- Directory where things like wave,midi,screenshot get captured.\n"
|
||||
);
|
||||
|
||||
|
|
|
@ -130,8 +130,14 @@ static struct {
|
|||
static bool add_key_forced(Bit16u code) {
|
||||
if (mem_readb(BIOS_KEYBOARD_FLAGS2)&8) return true;
|
||||
Bit16u start,end,head,tail,ttail;
|
||||
start=mem_readw(BIOS_KEYBOARD_BUFFER_START);
|
||||
end =mem_readw(BIOS_KEYBOARD_BUFFER_END);
|
||||
if (machine==MCH_PCJR) {
|
||||
/* should be done for cga and others as well, to be tested */
|
||||
start=0x1e;
|
||||
end=0x3e;
|
||||
} else {
|
||||
start=mem_readw(BIOS_KEYBOARD_BUFFER_START);
|
||||
end =mem_readw(BIOS_KEYBOARD_BUFFER_END);
|
||||
}
|
||||
head =mem_readw(BIOS_KEYBOARD_BUFFER_HEAD);
|
||||
tail =mem_readw(BIOS_KEYBOARD_BUFFER_TAIL);
|
||||
ttail=tail+2;
|
||||
|
@ -152,8 +158,14 @@ static void add_key(Bit16u code) {
|
|||
|
||||
static bool get_key(Bit16u &code) {
|
||||
Bit16u start,end,head,tail,thead;
|
||||
start=mem_readw(BIOS_KEYBOARD_BUFFER_START);
|
||||
end =mem_readw(BIOS_KEYBOARD_BUFFER_END);
|
||||
if (machine==MCH_PCJR) {
|
||||
/* should be done for cga and others as well, to be tested */
|
||||
start=0x1e;
|
||||
end=0x3e;
|
||||
} else {
|
||||
start=mem_readw(BIOS_KEYBOARD_BUFFER_START);
|
||||
end =mem_readw(BIOS_KEYBOARD_BUFFER_END);
|
||||
}
|
||||
head =mem_readw(BIOS_KEYBOARD_BUFFER_HEAD);
|
||||
tail =mem_readw(BIOS_KEYBOARD_BUFFER_TAIL);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue