aliens

Author Topic: Reversing to Orion - project 1oom  (Read 67811 times)

Offline Yataka Shimaoka

  • Colonel
  • ****
  • Posts: 284
  • I'm the trouble maker
    • View Profile
Re: Reversing to Orion - project 1oom
« Reply #60 on: May 27, 2018, 07:59:28 pm »
Sorry, but how do I install this?

Offline Kilgore T.M. Replicant

  • Colonel
  • ****
  • Posts: 100
  • Mangia!
    • View Profile
Re: Reversing to Orion - project 1oom
« Reply #61 on: May 28, 2018, 02:34:18 am »
Is always "printf" hack to find bug cause, this could track variables and see where is difference.

I made a test program and a new 1classic.exe. This is my last attempt; if the attached 1classic still does not work and the mtest reveals nothing then I simply stop making DOS binaries.

--- posts merged ---

Sorry, but how do I install this?

You don't. See README (or 1README.txt if you got a binary zip). If still not sure please point out which part of README (or INSTALL) is unclear.

(EDIT: ancient unuseful test progam removed)
« Last Edit: November 10, 2018, 02:54:17 pm by Kilgore T.M. Replicant »

Offline Yataka Shimaoka

  • Colonel
  • ****
  • Posts: 284
  • I'm the trouble maker
    • View Profile
Re: Reversing to Orion - project 1oom
« Reply #62 on: May 28, 2018, 05:44:55 am »
There is no readme in the zip

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: Reversing to Orion - project 1oom
« Reply #63 on: May 28, 2018, 06:39:30 pm »
Sorry, but how do I install this?
Just extract to your MOO1 folder. You need to get v0.3 first though: https://github.com/KilgoreTroutMaskReplicant/1oom/releases/tag/v0.3
Kilgore's ZIPs only include the updated EXEs, not the whole package.

Offline Kilgore T.M. Replicant

  • Colonel
  • ****
  • Posts: 100
  • Mangia!
    • View Profile
Re: Reversing to Orion - project 1oom
« Reply #64 on: May 29, 2018, 03:14:56 am »
There is no readme in the zip

Fair enough. I will add one to the future zips. The need for the v0.3 files is mentioned in 1version.txt, but that is easy to ignore.

--

As for the DOS mouse crash: I managed to replicate it by running DOS in QEmu. Curiously it happens with Microsoft's mouse.exe but not with ctmouse.exe from FreeDOS. The crash seems to be due to stack corruption; CS:EIP has a nonsensical value. The crash has manifested as hanging on an infinite loop, a "clean" crash with DJGPP/cwsdpmi.exe register dump, emulated machine reset and QEmu itself crashing.

The bug is not in 1oom code. My current understanding is that something is broken in Allegro (or my cross-compiling setup) when either calling software interrupts from hardware interrupt contexts or interrupts in general. Perhaps some non-reentrant handler is entered twice simultaneously; this would explain why my DOSBox version works perfectly all the time as (I guess) it spends 0 cycles in the mouse interrupt handler. Perhaps later versions have more accurate emulation.

This is one of those rare cases where asm-level debugging is the only way forward. I need to get a DOSBox version that crashes and compile it with the debugging options...

This is a deep rabbit hole that contains software/hardware interrupts, DPMI, real/protected mode switching and nondeterministic bug reproduction. Fixing this is in firmly in the Not Worth The Fucking Effort pile. Seeing how there are no open bugs, might as well bang my head against this particular wall for a few more days.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Reversing to Orion - project 1oom
« Reply #65 on: May 29, 2018, 09:35:42 pm »
Great that you find clue what cause this bug. Bugs like this are pain in ass, I today spend whole day in work trying find bug in my c# code that only happens on other peoples computers and not on my. After asking of couple of people to test it I manage to find that bug was in datapick control that read current windows locale and if value is "wrong" do not show any date at all.

Offline Kilgore T.M. Replicant

  • Colonel
  • ****
  • Posts: 100
  • Mangia!
    • View Profile
Re: Reversing to Orion - project 1oom
« Reply #66 on: May 30, 2018, 03:09:52 am »
Great that you find clue what cause this bug.

Still couldn't quite nail it but I managed to make a version that I can't get to crash (testing welcome). Removing the call to rest() seems to fix it. I fear the real bug is still lurking somewhere but is very difficult to reproduce in a way that makes it debuggable. (Got a frest SVN version of DOSBox and it still refuses to crash reliably.)

If this build works then I consider it good enough. I think my time is better spent on debugging the actual game rather than a port to a dead OS.

Bugs like this are pain in ass, I today spend whole day in work trying find bug in my c# code that only happens on other peoples computers and not on my. After asking of couple of people to test it I manage to find that bug was in datapick control that read current windows locale and if value is "wrong" do not show any date at all.

IMHO i18n is a curse word.

(EDIT: ancient build removed)
« Last Edit: November 10, 2018, 02:54:52 pm by Kilgore T.M. Replicant »

Offline Kilgore T.M. Replicant

  • Colonel
  • ****
  • Posts: 100
  • Mangia!
    • View Profile
Re: Reversing to Orion - project 1oom
« Reply #67 on: June 05, 2018, 06:28:36 am »
I have no account and hold some contempt at [GitHub].

Welp.

1oom has moved to GitLab: project, git, homepage

Still waiting for the DOS test results.

---
EDIT: to mark the occasion...

1oom v0.4 has been released. Changes:
    - add -uiscale N for viewing more of the galaxy at once
    - local multiplayer is ready for testing (use -new to start)
    - 1oom_pbxdump as the counterpart to 1oom_pbxmake
    - bug genocide marches on, notably:
    - AI fleets disappearing when sent fixed
    - AI ship design phase can no longer hang
    - MSDOS port should not crash at the slightest provocation

Source code: https://gitlab.com/KilgoreTroutMaskReplicant/1oom
Binaries: https://gitlab.com/KilgoreTroutMaskReplicant/1oom/tags/v0.4
Homepage: https://kilgoretroutmaskreplicant.gitlab.io/plain-html/

Note that the project has moved from GitHub to GitLab. Grab a fresh git clone.

HELP WANTED!

The code needs a lot of testing; play it and yell if it breaks! When it does, make a copy of 1oom_save8.bin pass it along the bug report.

---

EDIT the 2nd: Apologies to those helpful people spreading the word. Sorry about the link breakage! Have a childish PNG as an attempt at compensation.
« Last Edit: June 07, 2018, 06:00:29 am by Kilgore T.M. Replicant »

Offline Stoddard

  • Colonel
  • ****
  • Posts: 485
  • in a fey mood
    • View Profile
    • Linux builds & stuff
Re: Reversing to Orion - project 1oom
« Reply #68 on: June 15, 2018, 03:48:32 pm »

Offline Kammerer

  • Colonel
  • ****
  • Posts: 141
    • View Profile
Re: Reversing to Orion - project 1oom
« Reply #69 on: June 15, 2018, 06:14:06 pm »
1oom has moved to GitLab: project, git, homepage

It was moved to GitLab due to the fact that GitHub had been purchased by Microsoft.
« Last Edit: June 15, 2018, 07:36:12 pm by Kammerer »

Offline Stoddard

  • Colonel
  • ****
  • Posts: 485
  • in a fey mood
    • View Profile
    • Linux builds & stuff
Re: Reversing to Orion - project 1oom
« Reply #70 on: June 15, 2018, 06:28:43 pm »
It was moved to GitLab due to the fact that GitHub was purchased by Microsoft.

Thanks.

One wonders who would buy GitLab next.

btw it doesn't build:

Code: [Select]
../../../src/game/game_ai_classic.c:3751:28: error: ‘p2’ undeclared (first use in this function); did you mean ‘p1’?
             e1->diplo_type[p2] = 0;

looks like a typo

Offline Kilgore T.M. Replicant

  • Colonel
  • ****
  • Posts: 100
  • Mangia!
    • View Profile
Re: Reversing to Orion - project 1oom
« Reply #71 on: June 16, 2018, 11:29:11 am »
One wonders who would buy GitLab next.
please don't let it be facebook

Building centralized services named after the decentralized project that saved us from CVS / SVN hell always struck me as odd.

Quote
btw it doesn't build:

Sorry about that. Fix has been pushed. Must have been half asleep to not test compile before committing.

Offline Stoddard

  • Colonel
  • ****
  • Posts: 485
  • in a fey mood
    • View Profile
    • Linux builds & stuff
Re: Reversing to Orion - project 1oom
« Reply #72 on: June 16, 2018, 03:58:45 pm »
please don't let it be facebook


Whoever that might be, it's inevitable: they raised $45.5M in venture capital to date.


Offline Kilgore T.M. Replicant

  • Colonel
  • ****
  • Posts: 100
  • Mangia!
    • View Profile
Re: Reversing to Orion - project 1oom
« Reply #73 on: June 16, 2018, 09:45:33 pm »
Now that any goodwill this project may have gathered has been demolished by the avenue move, I guess it's back to tinyupload on the next offensive buyout.

Here's a dev build to celebrate recent feature creep. Notable changes:
- -uiextra enables things like new New Game screen
- new AI Classic+ for small fixes
- mouse wheel map zoom (-uiscale 2 or more) and slider adjust
- implemented various 1.40m fixes / improvements

I'm debugging overflows in AI code and need a late game save which has two or more opponents with large fleets of (near) max tech. Playing a game to that points takes a lot of time. If you happen to have such a save (for 1oom or MOO1 v1.3) then please send it to me.

(EDIT: ancient build removed)
« Last Edit: November 10, 2018, 02:56:12 pm by Kilgore T.M. Replicant »

Offline Stoddard

  • Colonel
  • ****
  • Posts: 485
  • in a fey mood
    • View Profile
    • Linux builds & stuff
Re: Reversing to Orion - project 1oom
« Reply #74 on: June 17, 2018, 12:20:02 am »
Now that any goodwill this project may have gathered has been demolished by the avenue move, I guess it's back to tinyupload on the next offensive buyout.

Well, once upon a time I ran an SVN server for the UFO2000.

I guess it's back to self-hosting repos. Any way one slices the orange, there has to be some place where for example my buildfarm is to get the source code from.

Not that much of a step, it's not like the forums, or my builds aren't self-hosted.

Any particular builds (OS/arch) you'd like automated?