From: Clarence Dang <dang@kde.org>
To: linux-msdos@vger.kernel.org
Subject: Re: [ 671573 ] Cosmo locks up
Date: Mon, 27 Jan 2003 10:50:10 +1100 [thread overview]
Message-ID: <200301271050.10982.dang@kde.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 673 bytes --]
Hi,
> download Cosmo's Cosmic Adventure from
> http://www.apogee1.com/downloads.html. it goes into
> infinite loop waiting for global variable to be set to 0 but
> the int8 timer that increments variable seems to fire at just
> wrong time. sounds like a PIC problem...but works in NT?
> :( not a DPMI app either.
For anyone whose interested, please try Stas' patch at sourceforge and the
attached one. Please report any observations and problems with the patches
(on Cosmo and other programs).
I'm posting this patch here because sf doesn't let you attach files to closed
bug reports it seems. You will have to "make clean" before using this patch.
Clarence
[-- Attachment #2: pit_apogee_trigger.patch --]
[-- Type: text/x-diff, Size: 4978 bytes --]
--- 1147pr/etc/dosemu.conf 2003-01-23 17:02:07.000000000 +1100
+++ 1147/etc/dosemu.conf 2003-01-24 22:57:31.000000000 +1100
@@ -181,7 +181,10 @@
#$_pic_watchdog = (off) # try setting this to some positive value (eg. 5)
# # if you get problems with some DOS program
# # freezing after some time.
+#$_pit_apogee_trigger = (off) # set this to 'on' if you want to play certain
+# # Apogee/ID/Softdisk games (eg. Cosmo & Keen 6)
#
+# Joystick settings
#$_joy_device = "/dev/js0 /dev/js1" # 1st and 2nd joystick device
# # e.g. "/dev/js0" or "/dev/js0 /dev/js1"
# # (or "" if you don't want joystick support)
--- 1147pr/etc/global.conf 2003-01-23 17:02:07.000000000 +1100
+++ 1147/etc/global.conf 2003-01-24 22:58:20.000000000 +1100
@@ -168,7 +168,8 @@
## with 'dosemu_' prefixed will overwrite those without the prefix.
checkuservar $_debug,
- $_features, $_mapping, $_hogthreshold, $_cli_timeout, $_pic_force_count,
+ $_features, $_mapping, $_hogthreshold,
+ $_cli_timeout, $_pic_watchdog, $_pit_apogee_trigger,
$_timint, $_mathco, $_cpu, $_rdtsc, $_cpuspeed, $_xms, $_ems, $_ems_frame,
$_dpmi, $_emusys, $_emuini, $_dosmem
checkuservar
@@ -396,6 +397,7 @@
## hacks
cli_timeout $_cli_timeout
pic_watchdog $_pic_watchdog
+ pit_apogee_trigger $_pit_apogee_trigger
## serial
if (strlen($_ttylocks))
--- 1147pr/src/base/dev/misc/timers.c 2003-01-17 05:19:00.000000000 +1100
+++ 1147/src/base/dev/misc/timers.c 2003-01-24 22:57:05.000000000 +1100
@@ -430,13 +430,21 @@
pit[port].time.td = GETtickTIME(0);
if (port == 0) {
+ if (config.pit_apogee_trigger) {
+ /* Cosmo, Keen 6,... */
+ if (pit[0].cntr == 1192) {
+ pit[0].cntr = 0x10000; /* 18.2 Hz */
+ error ("PIT: Apogee HACK: Changing from 1000Hz to 18.2Hz\n");
+ }
+ }
+
ticks_accum = 0;
timer_div = (pit[0].cntr * 10000) / PIT_TICK_RATE;
if (timer_div == 0)
- timer_div = 1;
-#if 0
- i_printf("timer_interrupt_rate requested %.3g Hz, granted %.3g Hz\n",
- PIT_TICK_RATE/(double)pit[0].cntr, 10000.0/timer_div);
+ timer_div = 1;
+#if 1
+ i_printf("timer_interrupt_rate count %i, requested %.6g Hz, granted %.6g Hz\n",
+ pit[0].cntr, PIT_TICK_RATE/(double)pit[0].cntr, 10000.0/timer_div);
#endif
}
else if (port == 2 && config.speaker == SPKR_EMULATED) {
--- 1147pr/src/base/init/config.c 2003-01-23 17:02:08.000000000 +1100
+++ 1147/src/base/init/config.c 2003-01-24 22:58:35.000000000 +1100
@@ -306,6 +306,7 @@
config.sb_base, config.sb_dma, config.sb_irq, config.mpu401_base, config.sb_dsp, config.sb_mixer);
(*print)("\ncli_timeout %d\n", config.cli_timeout);
(*print)("\npic_watchdog %d\n", config.pic_watchdog);
+ (*print)("\npit_apogee_trigger %d\n", config.pit_apogee_trigger);
(*print)("\nJOYSTICK:\njoy_device0 \"%s\"\njoy_device1 \"%s\"\njoy_dos_min %i\njoy_dos_max %i\njoy_granularity %i\njoy_latency %i\n",
config.joy_device[0], config.joy_device[1], config.joy_dos_min, config.joy_dos_max, config.joy_granularity, config.joy_latency);
--- 1147pr/src/base/init/lexer.l.in 2003-01-23 17:02:08.000000000 +1100
+++ 1147/src/base/init/lexer.l.in 2003-01-24 22:59:12.000000000 +1100
@@ -668,6 +668,7 @@
/* hacks */
cli_timeout RETURN(CLI_TIMEOUT);
pic_watchdog RETURN(PIC_WATCHDOG);
+pit_apogee_trigger RETURN(PIT_APOGEE_TRIGGER);
/* strings */
--- 1147pr/src/base/init/parser.y.in 2003-01-23 17:02:08.000000000 +1100
+++ 1147/src/base/init/parser.y.in 2003-01-24 23:15:51.000000000 +1100
@@ -305,7 +305,7 @@
/* joystick */
%token JOYSTICK JOY_DEVICE JOY_DOS_MIN JOY_DOS_MAX JOY_GRANULARITY JOY_LATENCY
/* Hacks */
-%token CLI_TIMEOUT PIC_WATCHDOG
+%token CLI_TIMEOUT PIC_WATCHDOG PIT_APOGEE_TRIGGER
/* we know we have 1 shift/reduce conflict :-(
* and tell the parser to ignore that */
@@ -732,6 +732,11 @@
{ config.cli_timeout = $2; }
| PIC_WATCHDOG int_bool
{ config.pic_watchdog = $2; }
+ | PIT_APOGEE_TRIGGER bool
+ {
+ config.pit_apogee_trigger = ($2!=0);
+ c_printf("CONF: pit_apogee_trigger %s\n", ($2) ? "on" : "off");
+ }
| STRING
{ yyerror("unrecognized command '%s'", $1); free($1); }
| error
--- 1147pr/src/include/emu.h 2003-01-23 17:02:08.000000000 +1100
+++ 1147/src/include/emu.h 2003-01-24 23:01:37.000000000 +1100
@@ -369,8 +369,10 @@
int joy_granularity; /* the higher, the less sensitive - for wobbly joysticks */
int joy_latency; /* delay between nonblocking linux joystick reads */
+ /* hacks */
int cli_timeout; /* cli timeout hack */
- int pic_watchdog; /* pic watchdog reschedule hack */
+ int pic_watchdog; /* pic watchdog reschedule hack */
+ boolean pit_apogee_trigger; /* enable trigger for apogee hack */
}
config_t;
next reply other threads:[~2003-01-26 23:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-26 23:50 Clarence Dang [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-01-27 1:19 [ 671573 ] Cosmo locks up Stas Sergeev
2003-01-28 2:24 Clarence Dang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200301271050.10982.dang@kde.org \
--to=dang@kde.org \
--cc=linux-msdos@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox