Commit Graph

85 Commits

Author SHA1 Message Date
Lephenixnoir 1f290006f1
Scrap some memory and somehow avoid heap fragmentation 2021-08-31 19:18:55 +02:00
Lephenixnoir 530355e36c
G3A update 2021-08-25 15:18:40 +02:00
Lephenixnoir fb06f2258a
Fix skull keys not showing up as intended 2021-08-25 15:18:12 +02:00
Lephenixnoir cc2fed1be4
Require less unaligned lumps to load 2021-08-25 15:17:57 +02:00
Lephenixnoir 34920bbacb
Generalize next-fit strategy over zones 2021-08-25 11:44:07 +02:00
Lephenixnoir fe82cef7c3
Add a powerful profiler (libprof) 2021-08-25 11:09:35 +02:00
Lephenixnoir 96c7a8bb11
Watch unaligned lumps and per-region free heap 2021-08-24 19:12:30 +02:00
Lephenixnoir d075ba2174
More progress in emulator build
I'd say this is about 70% complete to initial tests, then comes the
debugging. But that's for another day.
2021-08-14 15:11:37 +02:00
Lephenixnoir 2675d6d3aa
Progress in making the emulator build 2021-08-14 11:55:20 +02:00
Lephenixnoir a416d40eea
Organize folders and build system to prepare for small revamp
Goals include:
* To recover emulator code into a working state (using SDL2 as I cannot
  use the Windows library)
* To allow memory management in emulator to not mirror the intricacies
  of the calculator version (eg. aSystemStack, aVRAMBuffer, etc)
* To recover actual printf-style error messages on the calculator
* To use the standard library and avoid random reimplementations of
  functions
* And other code cleanups that are only possible with CGDoom-specific
  header files, instead of the mix in platform.h and os.h
2021-08-14 09:42:57 +02:00
Lephenixnoir b7c16fd8a0
G3A update 2021-08-12 21:24:58 +02:00
Lephenixnoir 535cc2eb4f
Improve key bindings for menus 2021-08-12 21:24:34 +02:00
Lephenixnoir 751d5f186d
Add a PRAM heap and move some of the data there
It's a 32-bit-access-only heap. On the Ultimate Doom WAD the amount of
data moved is about 17 kiB, which is not a lot, but arrays with 4-byte
elements are not easy to find in Doom.
2021-08-12 21:01:35 +02:00
Lephenixnoir 1639adce59
Fix Doom episode 2&3 and Doom II switches not animating properly 2021-08-12 17:19:32 +02:00
Lephenixnoir 56e0d05640
Fix some textures not being rendered, like STARGR2 in E2M3
This occurs if all texture IDs on a particular line are multiples of
256 (like STARGR2 = 256) since the cast to boolean (byte) destroys
significant bits.
2021-08-12 14:03:56 +02:00
Lephenixnoir 5520a6e5ee
Restore video mode after an error
When using direct-DD access, the window size would not be restored,
producing complete nonsense.
2021-08-12 13:12:48 +02:00
Lephenixnoir 64452f9f74
Fix probabilistic crash in Quit Game menu entry 2021-08-11 20:23:05 +02:00
Lephenixnoir 292581f87c
Fix FPS counter not acocunting for frameskip 2021-08-05 09:51:35 +02:00
Lephenixnoir d9f23fc156
Show FPS counter in its own top-right widget 2021-08-04 19:15:25 +02:00
Lephenixnoir fb796d7611
Fix blue key showing up as yellow
Not sure how we got there?!
2021-08-04 19:01:35 +02:00
Lephenixnoir 9c6ed32fee
G3A update 2021-08-04 18:50:00 +02:00
Lephenixnoir 40fe796d85
Add a main screen option to warp to any episode 2021-08-04 18:44:59 +02:00
Lephenixnoir 4dd99b0695
Improve number input in main screen 2021-08-04 18:44:29 +02:00
Lephenixnoir 92c8dcf56e
Restore white frame less agressively
OS does it on its own, so the transition is cleaner like that.
2021-08-04 18:24:37 +02:00
Lephenixnoir 18e583dad4
G3A update with direct-DD access 2021-08-04 15:59:11 +02:00
Lephenixnoir 4832390802
Add secondary VRAM as heap when using direct-DD access
Ultimate Doom E1M6 now loads!
2021-08-04 15:58:40 +02:00
Lephenixnoir 8c643db6a4
Set a black frame when using direct-DD access 2021-08-04 15:38:13 +02:00
Lephenixnoir db01fa04f2
Set a black frame when not using direct-DD access 2021-08-04 15:11:03 +02:00
Lephenixnoir 57624763e3
Add a compile-time option to use direct-DD access 2021-08-04 14:53:24 +02:00
Lephenixnoir 977f23a965
Add FPS counter, toggled with [(] 2021-08-04 14:26:36 +02:00
Lephenixnoir 33ec8b4651
G3A update with a lot of new levels 2021-08-04 13:40:19 +02:00
Lephenixnoir 6a73494e2c
Force lump allocation for unaligned Flash addresses 2021-08-04 12:08:07 +02:00
Lephenixnoir bb86fd1145
Add an option to start at any map 2021-08-04 11:34:02 +02:00
Lephenixnoir 8b7649c824
Restore all menu options to sane behavior
Load/Save game is still not supported.
2021-08-04 11:07:14 +02:00
Lephenixnoir 27f40b003e
Add brightness setting (gamma correction) on FRAC 2021-08-04 10:22:35 +02:00
Lephenixnoir 5e420d7c4a
TODO list update 2021-08-04 10:02:34 +02:00
Lephenixnoir 6d2bac49a2
Put all screens in SaveVRAMBuffer
This removes 6400 bytes from the Z_Malloc heap. There is about 27 kB
left in the secondary VRAM for further use.
2021-08-04 09:57:03 +02:00
Lephenixnoir 4c3b0b8fe6
Place WAD fragment map in PRAM0 2021-08-04 09:56:24 +02:00
Lephenixnoir 3e79691ad1
Report CGDMalloc failures 2021-08-04 09:55:36 +02:00
Lephenixnoir 58e007be85
DOOM -> Doom 2021-08-04 09:55:07 +02:00
Lephenixnoir b0c1f019e3
Find fragments in file map by binary search
This makes a noticeable difference in Ultimate Doom, which has a lot
more fragments by sheer file size.
2021-08-03 18:43:45 +02:00
Lephenixnoir 1e98b33a93
TODO list update 2021-08-03 17:54:12 +02:00
Lephenixnoir 9baaeb6d19
Store fragments' file address, not length
Cumulating lengths will allow a binary search for faster lookup. This is
important because performance seems to vary wildly with the number of
fragments, which I suspect is related to the linear search algorithms
(as there are often several hundred fragments).

Performance had dropped to 3.5s from 2.9s since last test, and
surprisingly this change pulls it back up to 2.9s, even though the
number of fragments now (150) is still more than during the first test
(100).

I suspect binary search will improve performance again. This would be
very helpful, as it would prove that WAD access is the primary
bottleneck for the game. Unlike actual game code, WAD access is
something we can look at and even optimize.
2021-08-03 17:50:27 +02:00
Lephenixnoir 92c1cfe522
Restore the V_Clear function
I removed it before because I had missed the point about clearing the
screen when changing "details" (= the level of detail).
2021-08-03 17:50:27 +02:00
Lephenixnoir e4c06f1ec5
Enable all composite textures (for now) 2021-08-03 14:55:12 +02:00
Lephenixnoir c7961f7992
G3A update with main UI and options 2021-08-02 22:02:19 +02:00
Lephenixnoir 0f9658279b
Add the LICENSE file and description 2021-08-02 22:00:46 +02:00
Lephenixnoir dce39fcbf5
Offer Bfile vs. mmap dynamically 2021-08-02 21:55:39 +02:00
Lephenixnoir b1f8a97983
UI improvements and sprintf 2021-08-02 21:11:13 +02:00
Lephenixnoir 4e7fa7781e
Add some custom UI for game selection and options 2021-08-02 19:19:42 +02:00