Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ccexplore

Pages: [1] 2 3 ... 347
1
General Discussion / Re: Simon blogs
« on: July 03, 2019, 11:45:28 pm »
VLC shows only seconds, and can only framestep forward.

Well as you can imagine, framestepping for most lossy video compression algorithms is a lot like managing game physics in Lemmings or Lix.  Advancing from current frame forward to next frame is of course totally supported because that's the normal flow of things anyway.  Whereas stepping backwards actually implies first stepping back a larger amount of time backwards, then advance forward one-by-one until reaching the target time; it's not otherwise possible to get back the previous frame from the current frame.  In Lemmings/Lix the backward jump would be to a previous internal checkpoint; the equivalent in video is called a "key frame", a frame which can be decompressed on its own without relying on data from previous frames.  Similarly, a seek to any position requires similar handling, first going to a key frame, then advance forward to the actual desired point.

With that in mind, it's not surprising that oftentimes seek is implemented in a less precise fashion, that merely jumps to the nearest key frame (even though it's technically not the right time you want to seek to), then just stalls (no display of new frames) until the playback time reaches the next key frame (so now what's displayed is finally back in sync with the playback time), at which point normal flow resumes thereafter.  For the kind of uses "your grandma" needs (eg. seek forward past some commercials, or seek backward to get back to something missed due to distractions), such an imprecise seek is nonetheless usually good enough.  So yeah, it might be harder to find support for backward framestepping.

2
General Discussion / Re: Simon blogs
« on: June 30, 2019, 10:10:28 am »
I need a precise video viewer: <snip>

All you ever find is extravagant video editing suites that crash, consume RAM, or aren't free-and-open-source. I don't want to edit the video; if I ever want to cut video, then ffmpeg on the command line suffices and won't crash.

Amazing how such a seemingly-simple tool (the only hard requirement: it gives me precise numbers) is so hard to find.

Hmm, wonder if VLC has this kind of feature.  Have you asked around speedrunning communities to see what kind of tools they've been using for this?

I can imagine this being a little hard to search for actually, it's not really the kind of feature you'd typically highlight on a product description page, more like a buried setting in options maybe.

I actually wonder if maybe you can just slap together something quick(ish) using HTML5 video element and JavaScript, and end up being able to achieve what you need inside a web browser.  I'm pretty sure you can get at least millisecond-precision playback position with HTML5 video?  Along that line of thinking, you could also try modifying an open-source media player that you are able to compile yourself as-is.

3
Linux, but there's a good chance it'll work correctly under WINE (except maybe the RNC decompression

Out of curiosity, what's so special about the RNC decompression that it might not work correctly under WINE? ???

4
Tech & Research / Re: 3D Lemmings file formats
« on: June 24, 2019, 11:21:37 pm »
EDIT: To clarify, when doing this step: "checksum = checksum + <next 2 bytes read as a 16-bit little-endian word>" - I assume we're immediately discarding anything above the 16th bit?

Ah yes, sorry, I forgot about that part with the add, that the mathematical sum can have more bits than the operands.  The CPU is running in 16-bit mode so AX is only 16 bits, thus you only keep lower 16 bits of the sum.  Will edit my post above for clarity.

5
Tech & Research / Re: 3D Lemmings file formats
« on: June 24, 2019, 10:19:21 pm »
Yeah, ROR is bitwise rotate right.  Anyway, here's pseudocode for above:

Code: [Select]
count = 1858
checksum = 0

do
   checksum = checksum + <next 2 bytes read as a 16-bit little-endian word>
   (equivalently:  checksum = checksum + <next byte> + <next next byte> * 256)
   checksum = checksum AND 65535   (ie. keep only lower 16 bits)
     
   checksum_last3bits = checksum AND 7
   checksum_shifted3bitsright = checksum div 8  (integer division dropping remainder, so 7 div 8 = 0, 8 div 8 = 1, 9 div 8 = 1)
   checksum_rotatelast3bitsintofirst3bits = checksum_last3bits * 8192
   checksum = checksum_shifted3bitsright OR checksum_rotatelast3bitsintofirst3bits

   checksum = checksum XOR count
   count = count - 1
while (count > 0)

The business in the middle is implementing the bitwise rotate with more commonly supported bitwise operators in high-level languages.  In case bitwise shifts are not available, I did those above using integer division and multiplication instead, you're welcome to just use shifts if they are available in your language (right shift by 3, and left shift by 13).

Based on the code, it expects 3716 bytes after the 2-byte checksum.  Maybe it's an off-by-1 error that the file size (excluding checksum) is 3717 rather than 3716?  The checksum algorithm is hardcoded to process exactly 3716 bytes.

[edit: fix missing the discarding all but lowest 16 bits after the add]

6
Tech & Research / Re: 3D Lemmings file formats
« on: June 24, 2019, 09:58:24 pm »
Ok, I started off at the end of the log since presumably the log ends at the point where the checksum value is written to memory.  Based on that, tell me if what I said below tracks with the savegame data being processed at the time:

Code: [Select]
1E58:0000745F  push fs                                                EAX:00000000 EBX:00001600 ECX:00000000 EDX:00000007 ESI:00000020 EDI:000003EE EBP:08100014 ESP:000007EE DS:1088 ES:1088 FS:6546 GS:2658 SS:25D7 CF:0 ZF:0 SF:0 OF:0 AF:0 PF:1 IF:1
1E58:00007461  mov  fs,[3D00]                  ds:[3D00]=6546         EAX:00000000 EBX:00001600 ECX:00000000 EDX:00000007 ESI:00000020 EDI:000003EE EBP:08100014 ESP:000007EC DS:1088 ES:1088 FS:6546 GS:2658 SS:25D7 CF:0 ZF:0 SF:0 OF:0 AF:0 PF:1 IF:1
1E58:00007465  mov  di,0002                                           EAX:00000000 EBX:00001600 ECX:00000000 EDX:00000007 ESI:00000020 EDI:000003EE EBP:08100014 ESP:000007EC DS:1088 ES:1088 FS:6546 GS:2658 SS:25D7 CF:0 ZF:0 SF:0 OF:0 AF:0 PF:1 IF:1
1E58:00007468  mov  cx,0742                                           EAX:00000000 EBX:00001600 ECX:00000000 EDX:00000007 ESI:00000020 EDI:00000002 EBP:08100014 ESP:000007EC DS:1088 ES:1088 FS:6546 GS:2658 SS:25D7 CF:0 ZF:0 SF:0 OF:0 AF:0 PF:1 IF:1
1E58:0000746B  xor  ax,ax                                             EAX:00000000 EBX:00001600 ECX:00000742 EDX:00000007 ESI:00000020 EDI:00000002 EBP:08100014 ESP:000007EC DS:1088 ES:1088 FS:6546 GS:2658 SS:25D7 CF:0 ZF:0 SF:0 OF:0 AF:0 PF:1 IF:1

1E58:0000746D  add  ax,fs:[di]                 fs:[0002]=5551         EAX:00000000 EBX:00001600 ECX:00000742 EDX:00000007 ESI:00000020 EDI:00000002 EBP:08100014 ESP:000007EC DS:1088 ES:1088 FS:6546 GS:2658 SS:25D7 CF:0 ZF:1 SF:0 OF:0 AF:0 PF:1 IF:1
1E58:00007470  ror  ax,03                                             EAX:00005551 EBX:00001600 ECX:00000742 EDX:00000007 ESI:00000020 EDI:00000002 EBP:08100014 ESP:000007EC DS:1088 ES:1088 FS:6546 GS:2658 SS:25D7 CF:0 ZF:0 SF:0 OF:0 AF:0 PF:0 IF:1
1E58:00007473  xor  ax,cx                                             EAX:00002AAA EBX:00001600 ECX:00000742 EDX:00000007 ESI:00000020 EDI:00000002 EBP:08100014 ESP:000007EC DS:1088 ES:1088 FS:6546 GS:2658 SS:25D7 CF:0 ZF:0 SF:0 OF:0 AF:0 PF:0 IF:1
1E58:00007475  add  di,0002                                           EAX:00002DE8 EBX:00001600 ECX:00000742 EDX:00000007 ESI:00000020 EDI:00000002 EBP:08100014 ESP:000007EC DS:1088 ES:1088 FS:6546 GS:2658 SS:25D7 CF:0 ZF:0 SF:0 OF:0 AF:0 PF:1 IF:1
1E58:00007478  loop 0000746D                                          EAX:00002DE8 EBX:00001600 ECX:00000742 EDX:00000007 ESI:00000020 EDI:00000004 EBP:08100014 ESP:000007EC DS:1088 ES:1088 FS:6546 GS:2658 SS:25D7 CF:0 ZF:0 SF:0 OF:0 AF:0 PF:0 IF:1

1E58:0000747A  mov  fs:[0000],ax               fs:[0000]=6313         EAX:00006DF2 EBX:00001600 ECX:00000000 EDX:00000007 ESI:00000020 EDI:00000E86 EBP:08100014 ESP:000007EC DS:1088 ES:1088 FS:6546 GS:2658 SS:25D7 CF:0 ZF:0 SF:0 OF:0 AF:0 PF:0 IF:1

1) So the checksum in hexadecimal is 6313, ie. first byte (hex) is 13 and second byte is 63?
2) In the loop, according to the logs the following values were the first few processed into the checksum calculation:
Code: [Select]
fs:[0002]=5551
fs:[0004]=4441
fs:[0006]=4F43
fs:[0008]=4552
fs:[000A]=0000

Translating to individual bytes, they would be (in hex):

51 55 41 44 43 4F 52 45 00 00

================

If above tracks with the savegame data, the next step is simply to translate the above calculation (from 1E58:00007465 to 1E58:00007478) from assembly to some pseudolanguage which you can understand well enough to implement yourself.

7
Tech & Research / Re: 3D Lemmings file formats
« on: June 24, 2019, 09:18:53 pm »
Further probing of web search results found a potential answer to the CPU logging issue:

https://www.vogons.org/viewtopic.php?f=32&t=7323&start=20#p162190

I assume the "core=normal" setting mentioned there is one of the settings in DOSBox.conf.  Sounds like you need to set that in order to ensure the CPU log is complete.  Can you try that and upload the resulting CPU log?  It's likely DOSBox will run (even) slower with the combination of that setting plus CPU logging enabled, but it's necessary.

It's still not ideal that the CPU log, as I feared, is just a linear sequence of executed instructions, but I can still try to work with that.  For now you can hold off on making memory dumps.

One more thing:  if you are able to set a data breakpoint on when the checksum memory location will be written to, do that and capture the CPU log at the time it hits that breakpoint.  Also, in case the log doesn't include the instruction for the breakpoint-triggering write (depends on whether it breaks before or after the write completed), copy whatever's displayed in the debugger window at the time the breakpoint is hit, I assume it should show the instruction being executed that triggered the data breakpoint.  Copy that info to end of CPU log.

[sidenote: for the memory dump thing I was requesting but holding off for now, you would take the address of the instruction the data breakpoint was hit, and grab maybe around 32000 bytes before and after the that address as the range to dump]

8
Tech & Research / Re: 3D Lemmings file formats
« on: June 24, 2019, 06:35:19 pm »
At the moment I'm not confident that I can make good use of the CPU logs.  Normally the leftmost column would be the memory address of the instruction being executed, but in the logs they don't line up with the jumps.  Maybe in the logs they have more to do with the location of instruction data as allocated by the emulator, rather than the instruction addresses as seen in emulation?  It might help if there's documentation on how to read the DOSBox CPU logs but I'm not finding any so far from a web search.

The best bet would probably be to find some way to locate the executed instructions in memory, do a memory dump, then use an external tool to disassemble the raw memory dump back to assembly code.  At work right now, will update later on how one might go about this.

9
Tech & Research / Re: 3D Lemmings file formats
« on: June 24, 2019, 09:27:03 am »
I could possibly try and get some CPU logs from DOSBox, if that helps. I have a fair idea of when L3D calculates this checksum (but I wouldn't know the first thing about understanding the CPU instructions that it follows to calculate it).

I haven't worked with DOSBox's debugging features, but if the CPU logs shows executed CPU instructions in assembly language format I could probably read it, though to be practical the log output needs to be loop-aware (it gets a bit annoying to read as you can imagine, if I have to manually skip through, say, 10000 iterations of some sequence of instructions executed in a loop producing that many lines in the logs).  So get the logs and we'd see how things go.  Alternatively, if the CPU logs help show the general memory addresses where the suspected CPU instructions are located, and DOSBox has a disassembly feature to convert the bytes in a memory region into assembly code, that will probably work better for me.  (And even without a disassembly feature, if DOSBox can at least dump the raw bytes of the memory region, I could load that into a debugger to look at disassembly.)

The checksum might not be CRC per se but just some other algorithm.  It can really be anything that's mildly tricky (or maybe not even that) to reverse engineer.  Honestly I'm kinda surprised they even bothered, it's just a savegame in a singleplayer game that already has a cheat code anyway.

10
Tech & Research / Re: Windows 10 App Store version of Lemmings
« on: June 20, 2019, 10:10:41 am »
Are you talking about this?  https://www.microsoft.com/en-us/p/lemmings/9wzdncrfjcdm?activetab=pivot:overviewtab

From the screenshots it looks like they just use the hi-res graphics from the Windows version of Lemmings (ie. the one released back around 1995).  The levels apparently include both the official Lemmings and ONML ones, plus some user-created levels as well.  (sample from app's page on the store).

All the app's files are installed under C:\Program Files\WindowsApps\5627pcio.dk.Lemmings_1.0.0.2_neutral__mj32vzt7ysac2, just paste that into the address bar of a Windows File Explorer window to get there.  Graphics for terrain and objects are under subdirectory Assets\Graphics and are all PNG files it looks like.  You can also find other things like music under other subdirectories in that Assets directory, they are all in widely used standard file formats like MP3 for the music.

It's pretty obvious which subdirectory has the levels.  Although the levels have a ".lev" extension, looks like they are actually just human-readable text files you can open and edit with, for example, Notepad.  It looks to me like simply a text version of the original game's binary level file format, down to the organization with the stats (eg. skill counts) come first, then objects, then terrain, then steel areas, and finally title.

11
NeoLemmix Main / Re: Anticipated Jumper behaviour
« on: June 16, 2019, 11:47:18 am »
Slightly off-topic but since Strato in effect brought it up:  I finally tried out jumpers + blockers in Classic tribe on DOS Lemmings 2 with help of GP's level editor.

Unsurprisingly, no, you cannot assign jumper to blockers.  Like others have said, blockers will not accept assignments of most skills.

But somewhat surprisingly, you apparently cannot reflect (ie. bounce) the jumper's trajectory against a blocker either.  The lemming still gets turned around mid-air and faces the opposite direction from before (and yes, will start walking in that new direction once landed), but the trajectory will continue as before, no reflection.

Also confirm similar behavior with shimmier and hopper as well.  Hopper, with its shorter horizontal span, actually winds up getting turned twice--it lands close enough to the other arm of the blocker to get the second turnaround, so facing direction is restored to pre-hop by time it lands.

And to be clear, other Lemmings 2-specific skills can react to blockers:  testing confirms for example that a shimmier shimmying along a low ceiling will turn around upon a blocker.

12
Hmm, I didn't realize tilemaps imply clusters, I actually thought namida was saying his editor will (at least initially) only support editing the smallest possible blocks.  But maybe I misread what he said.

In thinking about other games like Chip's Challenge and Baba is You, I can actually envision still reasonably usable editors for those games that don't offer any move/cut/copy-paste features, so I can kind of see why namida may choose to fashion the L3D editor similarly at least on first iteration.  But I still think move/cut/copy-paste editor features (and predefined clusters if available) may be more needed for Lemmings games compared to those other games, given how one would construct terrain.

13
Well I suppose you could start with only offering tilemap-based editing.  Keep in mind that L2 also actually uses a tilemap (at least for terrain), but imagine how painful it'd be to create custom levels there if you have to do it tile by tile.  At some point, the need will arise to at least be able to move a group of blocks together in order to tweak the position of something you've already created in the level.  Yes, all positions you move to must snap to the block grid, but you'd still want to be able to move the thing, rather than having to re-create it block by block in the new position.

14
Back to talking about the editor - from developing Space Station, I'm starting to feel that mouse control is really awkward for this. I'm going to look at also implementing keyboard-based controls for block placement (mouse will be retained as a secondary option, but it's actually quite awkward so I'd rather not present it as the main option).

Still not yet having played the game, I gotta ask:  how was experience of mouse-selecting lemmings to assign skills to in the game itself?

I guess one main difference is with the editor and unlike the game, select is just the first step, you also need to then move the selected thing around freely in 3D, which definitely sounds better with keyboard control.

15
I think Classic Tribe's total would be different as only one level comes to mind if using the Crawling/Y-Sliding and that'll be "Classic 07: So close but so far away".

Yeah, that sounds about right, I don't recall any other levels besides the 3 mentioned need any special glitches to save everyone.

For Classic 7, here's a reminder of the level (although it's written for Amiga version, I verified the stats and level layout are identical to DOS version).  Gold for that level allows for losing up to 4 actually.  A conventional solution almost certainly requires losing at least 2, possibly more depending on how many builders minimum you need to get up to the top.  The limited number of skills given and all that steel doesn't really leave much room for deviation when it comes to conventional solutions.  Maybe you can try and see what you can get for that level if crawling is not allowed.

Pages: [1] 2 3 ... 347