Author Topic: nDOOM - Work in progress  (Read 104108 times)

0 Members and 1 Guest are viewing this topic.

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: nDOOM - Work in progress
« Reply #90 on: January 06, 2011, 09:37:01 pm »
If there are new syscalls used, the solution would be to make a fresh build from the SVN (or wait until the next release). Back-compatibility with OS 1.7 is planned, as far as I know.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline turiqwalrus

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 840
  • Rating: +51/-2
  • Wheeeeeee~!
    • View Profile
Re: nDOOM - Work in progress
« Reply #91 on: January 06, 2011, 09:40:55 pm »
this looks pretty cool, definately much cooler than the old one. will download when I get my laptop(soon).

Offline Goplat

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 289
  • Rating: +82/-0
    • View Profile
Re: nDOOM - Work in progress
« Reply #92 on: January 07, 2011, 05:39:21 pm »
mViewer is quite stable with Ndless 1.7, on non-CAS calculators, or even with Ndless 2.0 on non-CAS calculators.
I've got problems with the same binaries with Ndless 2.0 on a CAS ClickPad.
After exiting mViewer, the calculator does freeze or reboot very often (which does not happen on the non-CAS).

So may be there is a wrong address for a 2.0 CAS syscall, I'll try to find it. Tell me if you happen to have an idea on which one it could be.

I think freopen might be wrong, syscalls_cas-2.0.1.c has it as 102F6FFC but it should be 102F6FB8.

EDIT: this couldn't be the problem, Ndless 1.7 didn't have freopen :/
« Last Edit: January 07, 2011, 05:42:02 pm by Goplat »
Numquam te deseram; numquam te deficiam; numquam circa curram et te desolabo
Numquam te plorare faciam; numquam valedicam; numquam mendacium dicam et te vulnerabo

Offline critor

  • Editor
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2079
  • Rating: +439/-13
    • View Profile
    • TI-Planet
Re: nDOOM - Work in progress
« Reply #93 on: January 07, 2011, 05:45:07 pm »
I've been looking into the crash-on-quit bug and it's driving me crazy. It always seems to crash after main() returns, which might indicate a fault with Ndless

You also get crashes on exit:
- if you haven't freed all allocated spaces
- if you haven't closed all open files
TI-Planet co-admin.

Offline Mrakoplaz

  • LV3 Member (Next: 100)
  • ***
  • Posts: 46
  • Rating: +130/-2
  • Prussian Minister of War
    • View Profile
Re: nDOOM - Work in progress
« Reply #94 on: January 08, 2011, 06:42:30 am »
Still no progress, I am afraid. Mostly, I've just been lazy and trying to enjoy the last few days of holidays to their fullest...

You also get crashes on exit:
- if you haven't freed all allocated spaces
- if you haven't closed all open files
Hmm, I do close the wad file, but I am worried about freeing all allocated spaces... I think I've missed a few here and there. I just want to make sure, that refers only to the spaces claimed by malloc() and realloc(), right? Not every single variable and array there is, I hope, since that would be insane.

So may be there is a wrong address for a 2.0 CAS syscall, I'll try to find it. Tell me if you happen to have an idea on which one it could be.
My only idea was the free() call, after which the application always crashes, but you already checked that, so no ideas, sorry.

Are you sure ndless 2.0 progs work on 1.7? I just get a reboot when I run ndoom.
Just a reboot? No error message, no screen full of garbage, just a reboot immediately after running the executable? I've never had that happen with the current releases, there was always at least an error (not counting the crash-on-exit, that is). What OS/keypad/CAS you have?

Mrakoplaz: I understand how you feel about svn... until I lost 3 months worth of code, recovered half of it, then broke it once again, without the possibility to revert 3 days of (bad) work. However I'm not here to force anyone to do anything, so that's fine.

Just to say that I don't either use svn for shared projects, but the dumb way, as a cheap incremental backup with log messages. svn with more than 1 developer is a mess as soon as 2 people change the same file (half joke - but svn branches really sucks), and git seems nice but is too complicated for me. but the backup side of svn is nice. again, just my 2 cents, I totally respect your freedom.
Hey, if something like that happened to me, I'd probably love it too ;D
However, I am ridiculously over-organized, and set up incremental backups on several external/USB drives, all of them labelled and such. I'd guess a SVN would make it a bit easier, but I have batch files and don't need the internet for my method (my connection is a bit... unreliable, let's say).

Since it accepts .wad files, I'll have to try this with Chex Quest :)
Unfortunately, I don't think it's strictly compatible. It might be, but I think Chex Quest had a few minor executable changes which could make a big difference. Did Ultimate Doom (the source for this port) work with a chex quest wad file?
Also, although the compatibility for any wad file is there theoretically, practically it's only been tested with the Doom 1 demo, so I have no idea if it will actually work at this stage (I'll start testing it with other wad files once the demo is fully playable, though!).

Yes, the clickpad controls are horrible. They would be a lot better if:
1) The left and right keys would rotate the display instead of strafing
2) Use Esc and Home keys for strafing
Ah, thanks for your suggestion! I had no idea where to put the two strafe keys, and didn't even for a second think of using those giant esc/home buttons staring me in the face...
I'll put in the next release, which I'll release when I fix the rendering in level 2. If you're desperate enough, the input code is in i_system.c and quite understandable (even though it's a fairly clumsy hack of fitting asynchronous events into a synchronous system).

Also, cheers everyone, for your great feedback. I know I say this every post, but I do genuinely mean it each and every time!

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: nDOOM - Work in progress
« Reply #95 on: January 09, 2011, 05:38:37 am »

I think freopen might be wrong, syscalls_cas-2.0.1.c has it as 102F6FFC but it should be 102F6FB8.

EDIT: this couldn't be the problem, Ndless 1.7 didn't have freopen :/

You're right, it's fixed, thanks.

The 2.0 revision I'm using currently is 351.
(...)
mViewer is quite stable with Ndless 1.7, on non-CAS calculators, or even with Ndless 2.0 on non-CAS calculators.
I've got problems with the same binaries with Ndless 2.0 on a CAS ClickPad.
After exiting mViewer, the calculator does freeze or reboot very often (which does not happen on the non-CAS).

The CAS ClickPad did even reboot one time while I was working in the OS, which never happened to me before (no, the RAM was not full).

Both Levak and I have been using TI-Nspire CAS ClickPad for the nDoom tests, which could explain the high freeze/reboot rate.

I have checked all the syscalls used by mViewer, they all appear to be correct.
There is an important change at revision 354 related to CPU cache issues, that can make the calculator hang (and perhaps reboot although I haven't seen this) on program exit. Could you please try to reproduce the problem on a fresh update?
(we could probably move the discussion to the Ndless thread)
Ndless.me with the finest TI-Nspire programs

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: nDOOM - Work in progress
« Reply #96 on: January 09, 2011, 07:07:25 am »
Mrakoplaz: programs can be built with the GCC option -std=c99 with the latest update of Ndless 2.0, so you could have replaced calls to alloca() in the original source code with variable-length arrays.
Ndless.me with the finest TI-Nspire programs

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: nDOOM - Work in progress
« Reply #97 on: January 09, 2011, 07:13:05 pm »
I hope to see new updates on this soon, this looks really promising. :)

Don't give up on the project!

Offline Mrakoplaz

  • LV3 Member (Next: 100)
  • ***
  • Posts: 46
  • Rating: +130/-2
  • Prussian Minister of War
    • View Profile
Re: nDOOM - Work in progress
« Reply #98 on: January 14, 2011, 08:11:34 pm »
Well, sorry everyone for lack and slowness of updates, but not only does school take a long amount of time, but the bugs that are left are increasingly getting more and more obscure (the one I just fixed in this release, everything went wrong due to a single bit being zero instead of one... and this bit wasn't a boolean, it was inside a 4-byte int!) and thus take longer to fix.

Release features:
  • Rendering bug in level 2 fixed, this should be the final rendering bug (I hope)
  • Added loading screen (useful on real hardware, where the loading actually takes some time)
  • Playtested up to level 4 or so
  • Lowered default difficulty to easy, because I kept dying (still no menu, though...)
  • Manual weapon selection (finally! use A/B/C/H/I/J on Touchpad, or 1-6 on Clickpad)

The crash-on-exit, lack of automap, etc. are still all there, but at least now all the levels are playable and the game can be said to finally work (sort of). Further releases will concentrate on improving the experience (difficulty selection, improved palette, savegame support...).

A peculiar thing: With the introduction of the loading screen, the screen as a whole shifts slightly to the bottom left (~10 pixels in each is my guess). I remember that the particles demo had this bug, and it was resolved by not reading from the screen buffer - however, I am not doing that. All I'm doing is writing (memset and memcpy). I'll attempt to do a test case, but not sure if I'll have the time to do so. Nevermind that, I'm just an idiot.

Again, suggestions for better controls/misc improvements are always welcome. Also reports of crashes.
« Last Edit: January 15, 2011, 12:07:36 pm by Mrakoplaz »

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: nDOOM - Work in progress
« Reply #99 on: January 14, 2011, 11:41:49 pm »
Great to see more updates. Compared to the average project, your updates are actually quite fast. Keep it up :thumbsup:

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: nDOOM - Work in progress
« Reply #100 on: January 15, 2011, 02:07:28 am »
Wow nice work on the bug fixes!  You are really working hard, and its really paying off!

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: nDOOM - Work in progress
« Reply #101 on: January 15, 2011, 02:59:41 am »
I wonder if we could port Valgrind or an equivalent tool to diagnostic your crash on exit.
Ndless.me with the finest TI-Nspire programs

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: nDOOM - Work in progress
« Reply #102 on: January 15, 2011, 06:21:46 pm »
Its most likely too much memory is being used for the wads, those are like 4mb, right? They are probably overwriting the os memory, thus crashing the os on exit.

Offline apcalc

  • The Game
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1393
  • Rating: +120/-2
  • VGhlIEdhbWUh (Base 64 :))
    • View Profile
Re: nDOOM - Work in progress
« Reply #103 on: January 15, 2011, 07:11:13 pm »
This is really amazing!  Excellent work, Mrakoplaz! :)


Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: nDOOM - Work in progress
« Reply #104 on: January 15, 2011, 08:17:27 pm »
Its most likely too much memory is being used for the wads, those are like 4mb, right? They are probably overwriting the os memory, thus crashing the os on exit.
I've run 4MB ROMs in gbc4nspire before (granted, that was on OS 1.1, but still)
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman