code logs -> 2019 -> Tue, 20 Aug 2019< code.20190819.log - code.20190821.log >
--- Log opened Tue Aug 20 00:00:54 2019
00:04 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
00:06
<~Vornicus>
ok. (x-1) * 55 in X, 0 in userspace 3 and 5, 2 in Y, 3fd7 (starting at 0) in A; if that's not 0 then instead get 0f65,X -- oh but there's another! -- if it IS zero, use 1041 instead. those two values are ..220 apart.
00:06
<~Vornicus>
...let's see what's in these 440 bytes.
00:17
<~Vornicus>
What. The. Fuck.
00:17
<~Vornicus>
no that can't be sensible what are you doing
00:19
<~Vornicus>
$0e74: beq $0e7a; $0e76: lda $3fd6; $0e79: bit $20a9... but that's a 3-byte instruction, $0e7a is in the middle of that.
00:23
<&McMartin>
Oh, that's a classic trick.
00:23
<&McMartin>
It's a conditional execution fakeout.
00:23
<&McMartin>
The *real* instruction is LDA #$20
00:23
<&McMartin>
At 0e7a
00:23
<&McMartin>
The BIT (Absolute) is a no-op that consumes the real instruction as an argument, to make it be ignored if you came in from the lda before
00:23
<&McMartin>
So it's a ?. like operation
00:24
<&McMartin>
Er wait not
00:24
<&McMartin>
not ?., ??.
00:24
<~Vornicus>
a who what
00:24
<&McMartin>
Apparently it's "the Elvis operator" because people are dicks
00:24
<&McMartin>
But it's like "if x isn't null, be x, otherwise be this other thing"
00:25
<&McMartin>
So you're loading either [$3FD6] or #$20 depending on Zero flag
00:25
<&McMartin>
into .A
00:25
<&McMartin>
So it's ?:.
00:27
<~Vornicus>
Okay! What the hell! All right
00:32
<~Vornicus>
okay so this whole thing is: check whether a particular bit is set; if so, fill A with whatever's in $3fd6 (which I set earlier with random to retry) or $20.
00:38
<~Vornicus>
Man this code feels like an entirely different person wrote it
00:40
<~Vornicus>
A two-entry-point function that modifies itself based on the entry point to decide whether to read or write to screen memory
01:01
<&McMartin>
It may well have been; magazines and books had been published for years with routines to use in your own programs.
01:02
<&McMartin>
Incidentally, when people talk about Super Mario Brothers interpreting the same bytes as different program code depending on context, that ?: trick is what they're referring to
01:02
<&McMartin>
I have yet to hear of any more subtle uses of the technique.
01:19 Degi_ [Degi@Nightstar-sh5d0j.dyn.telefonica.de] has joined #code
01:22 Degi [Degi@Nightstar-9fqils.dyn.telefonica.de] has quit [Ping timeout: 121 seconds]
01:28 Degi_ [Degi@Nightstar-sh5d0j.dyn.telefonica.de] has quit [Connection reset by peer]
01:45 himi [sjjf@Nightstar-1drtbs.anu.edu.au] has joined #code
01:45 mode/#code [+o himi] by ChanServ
01:59 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
03:39 Pinkhair [user1@Nightstar-g7hdo5.dyn.optonline.net] has quit [Connection reset by peer]
03:41 himi [sjjf@Nightstar-1drtbs.anu.edu.au] has quit [Operation timed out]
05:26 celticminstrel [celticminst@Nightstar-6an2qt.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
07:53 * McMartin does battle with SDL2
07:54
<&McMartin>
Other parts of this codebase don't compile, so it's kind of fighting blindfolded for awhile.
08:12 himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code
08:12 mode/#code [+o himi] by ChanServ
09:14 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
09:14 mode/#code [+qo Vornicus Vornicus] by ChanServ
10:48 You're now known as TheWatcher[d00m]
10:55 Kindamoody[zZz] is now known as Kindamoody
11:10
<~Vornicus>
55 bytes is 20x22 bits. THese are maps; only the left half, the right half is mirrored, the bottom line is copied from the top
11:10
<~Vornicus>
Now, we get somewhere
11:35
<~Vornicus>
that's the map rendering loop.
11:52 * Vornicus marks another half a kilobyte of the program as data. getting closer.
12:32 You're now known as TheWatcher
13:00
<~Vornicus>
this function picks a random open spot in the maze.
13:02
<@TheWatcher>
AHAHA, IT VERKS!
13:08
<~Vornicus>
?
13:14
<@TheWatcher>
Scheduling system I've added to the job processor for my new lab managment interface
13:16
<~Vornicus>
giiray
13:34 Vash [Vash@Nightstar-sjaki9.res.rr.com] has joined #code
13:45
<&ToxicFrog>
hoorj
13:45
<&ToxicFrog>
Meanwhile, I spent yesterday evening thinking and I think I now have a way of handling fog of war in ttymor that doesn't suck infinitely
13:45 * Vornicus gives Vash a function that chooses a random open spot in the maze
13:45
<@TheWatcher>
OTOH, windows jenkins agents can die in a fire of firey death and fire
13:46
<&ToxicFrog>
When creating a map, also create a persistent fovmap attached to it, initialized to all-blocked
13:46
<&ToxicFrog>
Whenever fov is calculated (which is currently done in MapView, although I may want to change that), take the results of the calculation and union it with the persistent fovmap.
13:47
<&ToxicFrog>
When rendering or peeking the map, filter the results through the fovmap and the current fov; something visible in both is displayed as is, something visible only in the latter displays only inanimate objects, and something visible in neither displays nothing.
13:49
<~Vornicus>
can inanimate objects not in your view be manipulated by other entities? If so you may want to store data about what was there last time you saw it. cf Starcraft, which would display buildings outside of your field of vision as there even if they've subsequently been destroyed (or repaired - it held damage data too so you could see buildings on fire and/or bleeding)
13:51
<&ToxicFrog>
Not really, no.
13:52
<&ToxicFrog>
Recall that in DoD enemies can't pick up and use items as they can in e.g. Nethack, nor can they open doors
13:53
<&ToxicFrog>
They can step on traps, but I'm ok not caring about the very rare case where an enemy is activated by you but then breaks LoS and wanders into a trap in an area you've already explored.
13:53
<~Vornicus>
that does sound pretty rare
13:55
<&ToxicFrog>
(nethack actually takes a similar approach to what I describe here, in fact, which leads to a sort of "limited fog of war" where you can't see enemies outside of LoS, but if you have already explored an area, you can see doors opening and items appearing/vanishing)
13:55
<&ToxicFrog>
(thematically we could describe this as the PC getting familiar enough with the unique acoustics of each area to pinpoint exactly which door is being opened by the sound of its hinges in the distance, etc~)
13:56
<&ToxicFrog>
(but this also happens much more frequently in NH, both because enemies have more ways of interacting with the environment beyond "move" and "attack", and because NH enemies are always active rather than being mostly asleep until they see you)
13:57
<~Vornicus>
(the PC is remarkably good at that if that's the case)
14:05 Kindamoody is now known as Kindamoody|afk
14:07
<@ErikMesoy>
Video game protagonists tend to be remarkably good at a remarkably wide variety of skills, yes.
14:09
<@TheWatcher>
(And also able to carry several times their own weight in items~)
14:12
<&ToxicFrog>
(the PC is clearly an orb weaver)
14:13
<&ToxicFrog>
(capable of lifting 5x their own weight and also incredibly sensitive to vibration)
14:13
<~Vornicus>
(with 5 meter tentacles)
14:13
<&ToxicFrog>
(that snake across the ground but are unable to support their own weight, etc)
14:13
<&ToxicFrog>
(brb, writing The Nethacker's Guide to Sin)
15:57 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
16:01 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code
16:01 mode/#code [+ao ToxicFrog ToxicFrog] by ChanServ
17:03 Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has joined #code
17:13 gnolam [quassel@Nightstar-csto10.cust.bahnhof.se] has joined #code
17:13 mode/#code [+o gnolam] by ChanServ
17:55 Vash [Vash@Nightstar-sjaki9.res.rr.com] has quit [Ping timeout: 121 seconds]
18:12
<&[R]>
Any recomendations for an Android IMAP/SMTP client?
18:12
<&[R]>
Currently using MS Outlook for Android, but it's complete ass
18:17
<&ToxicFrog>
Historicaly I've used K9 Mail and Google Mail (not gmail, but the IMAP client that comes with android)
18:17
<&ToxicFrog>
And I didn't completely hate either of them
18:22
<&[R]>
Wicked, thanks
18:37 Vorntastic [uid293981@Nightstar-6br85t.irccloud.com] has quit [[NS] Quit: Connection closed for inactivity]
18:58 Kizor [moryok@Nightstar-e0a4sm.utu.fi] has quit [[NS] Quit: leaving]
19:15
<~Vornicus>
00 0a 14 1e 28 32 3c 46 50 5a 64 6e 78 82 8a -- gee I wonder what these are
19:16 Kizor [moryok@Nightstar-e0a4sm.utu.fi] has joined #code
19:24
<@abudhabi>
Hah.
19:27 * [R] doesn't get it
19:28
<~Vornicus>
I found this data in the program I'm disassembling
19:28
<~Vornicus>
(for 6510, so no multiplication instruction)
19:28
<&[R]>
Oh wait, is that 0 10 20 30 40...
19:29
<~Vornicus>
yes
19:31
<&[R]>
8a is the odd one out though
19:31
<~Vornicus>
mistranscribed
19:31
<~Vornicus>
it's actually 8c
19:31
<&[R]>
$ printf '%02x ' $(seq 10 10 250); echo
19:31
<&[R]>
0a 14 1e 28 32 3c 46 50 5a 64 6e 78 82 8c 96 a0 aa b4 be c8 d2 dc e6 f0 fa
19:31
<&[R]>
Ah
20:07
<&McMartin>
Heh. I always did binary multipliers
20:07
<~Vornicus>
this one so far I've found multiplication tables for 40, 55, and now 10
20:10
<~Vornicus>
(40 for screen width, 55 for game maps, and I'm not sure what it's doing with this one yet)
20:14
<&[R]>
Interesting that they did 40 and 10
20:15
<&[R]>
Given that they'd doing table-lookup multiplication
20:15
<&[R]>
I'd think just having a 5 table and then doing bitshifts would be fine
20:23
<~Vornicus>
the 40 goes up *way* higher
20:23
<~Vornicus>
the 40 actually is words, for one thing, it goes all the way up to 960.
20:24
<~Vornicus>
(and for some reason is generated during init instead of being in the data segment(s))
20:33
<~Vornicus>
(and the 10 one stops at 140. dunno what it's up to)
21:10
<&McMartin>
40 is for counting addresses of character rows
21:10
<&McMartin>
The screen is 40x25, so 960 is the last line.
21:18 gnolam [quassel@Nightstar-csto10.cust.bahnhof.se] has quit [[NS] Quit: Z?]
21:24 Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has quit [Ping timeout: 121 seconds]
21:59 Kindamoody|afk is now known as Kindamoody
--- Log closed Wed Aug 21 00:00:55 2019
code logs -> 2019 -> Tue, 20 Aug 2019< code.20190819.log - code.20190821.log >

[ Latest log file ]