VOGONS


First post, by igermi

User metadata
Rank Newbie
Rank
Newbie

I'm trying to better understand why ICR2 sometimes (rarely and somewhat randomly) crashes back to the dosbox CLI. I am part of a small community of folks that dedicate a lot of their time to this game. (personally I spend months building tracks and content for it).

I am motivated to learn assembly and try and figure this out- but I am having problems getting started. I was considering maybe reaching out to someone who knows more that could maybe teach me, or even sortof be "hired" to do this. Mostly I am interested in becoming self sufficient.

attachment.php?aid=2403
attachment.php?aid=2404

Reply 2 of 7, by igermi

User metadata
Rank Newbie
Rank
Newbie
hail-to-the-ryzen wrote on 2024-12-30, 02:35:

An install guide is available:
https://m.youtube.com/watch?v=9eHj6sgy52Y

Thank you for your reply. I am well aware of the tutorial as this is one of the channels I religiously watch this game being played on. I have no problems getting the game running, however we randomly experience these kinds of crashes from time to time and I believe it is a bug that is present in the original game that seems to show up more often in home-made content. I am trying to learn more about how the game works by studying assembly code and doing some reverse engineering but I'm sure there are more people qualified than me.

Reply 3 of 7, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

A divide by zero can happen for a number of reasons. A system that is "too fast" is a common cause, so rather than cycles=auto (the default) or cycles=max, try a fixed number like cycles=10000 or cycles=20000 for a 1996 game. Another important thing to try is core=normal, as there is a small chance the divide error results from using the dynamic core.

Reply 4 of 7, by igermi

User metadata
Rank Newbie
Rank
Newbie
ripsaw8080 wrote on 2024-12-30, 04:50:

A divide by zero can happen for a number of reasons. A system that is "too fast" is a common cause, so rather than cycles=auto (the default) or cycles=max, try a fixed number like cycles=10000 or cycles=20000 for a 1996 game. Another important thing to try is core=normal, as there is a small chance the divide error results from using the dynamic core.

Interesting. My dosbox config has:

[cpu]
# core: CPU Core used in emulation. auto will switch to dynamic if available and
# appropriate.
# Possible values: auto, dynamic, normal, simple.
# cputype: CPU Type used in emulation. auto is the fastest choice.
# Possible values: auto, 386, 386_slow, 486_slow, pentium_slow, 386_prefetch.
# cycles: Amount of instructions DOSBox tries to emulate each millisecond.
# Setting this value too high results in sound dropouts and lags.
# Cycles can be set in 3 ways:
# 'auto' tries to guess what a game needs.
# It usually works, but can fail for certain games.
# 'fixed #number' will set a fixed amount of cycles. This is what you usually
# need if 'auto' fails (Example: fixed 4000).
# 'max' will allocate as much cycles as your computer is able to
# handle.
# Possible values: auto, fixed, max.
# cycleup: Amount of cycles to decrease/increase with keycombos.(CTRL-F11/CTRL-F12)
# cycledown: Setting it lower than 100 will be a percentage.

core = auto
cputype = auto
cycles = auto
#cycles = fixed 80000
cycleup = 10
cycledown = 20

I don't experience the crash as much as others. I built this computer in 2013 and it was fast at that time. However it seems that most of the time these crashes are reported on home-brew tracks that were made for the game using tools that were (I believe) tools made by the original authors. One of my fellow community members is having this more often and I would love to know if the info you posted might help. The problem for him is that he streams this game live, and for example the crash happened to him today after 2 hours of working on a race at a track I spent 6 months building from scratch. I was hoping that if I could learn assembly it would help me understand why this is happening. It's been a while (25-30 years) but I believe we had this same crash (although infrequent) back when I was a kid with a real dos machine as well.

Reply 5 of 7, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The error message includes the CS:IP, so you can look at the divide instruction at that address in the DOSBox debugger and trace back to try to understand how the exception happens. However, it could be a frustrating process for someone just starting to learn assembly.

BTW, I forgot to mention trying to run the game with the DOS32A extender instead of the included DOS4GW extender -- it may not work at all, or it may actually solve the problem.

Reply 6 of 7, by hail-to-the-ryzen

User metadata
Rank Member
Rank
Member

It may help to post the memsize given it is one of many unreported changes to the configuration file (OP).

Reply 7 of 7, by igermi

User metadata
Rank Newbie
Rank
Newbie
ripsaw8080 wrote on 2024-12-30, 09:33:

The error message includes the CS:IP, so you can look at the divide instruction at that address in the DOSBox debugger and trace back to try to understand how the exception happens. However, it could be a frustrating process for someone just starting to learn assembly.

BTW, I forgot to mention trying to run the game with the DOS32A extender instead of the included DOS4GW extender -- it may not work at all, or it may actually solve the problem.

I will keep this in mind. I also want to learn assembly so that I can make changes to the way the game works. I have been reading about it and I need to educate myself.

hail-to-the-ryzen wrote on 2024-12-31, 01:21:

It may help to post the memsize given it is one of many unreported changes to the configuration file (OP).

I think my memory is set at 16mb in my dosbox ECE config.