--- Log opened Thu Dec 20 00:00:25 2007 |
00:04 | < MyCatVerbs> | ToxicFrog: gcc is renowned for being awful w.r.t. cross compiling. Or so I'm told. >_> |
00:06 | | ilf_food is now known as ilovefire |
00:16 | <@ToxicFrog> | I generate all my windows releases using a gcc linux-host mingw32-target cross compile. |
00:16 | <@ToxicFrog> | However, exact binary equivalence isn't a priority for me. |
00:36 | <@McM[SanDiego]> | Build your cross-compiler with the cross-compiler. >_> |
00:36 | | * McM[SanDiego] finishes his UQM purge. |
00:39 | | * Kyrre dances with ToxicFrog. |
01:13 | | ilovefire is now known as ilf_AFK |
01:14 | <@ToxicFrog> | McM: actually, my planned procedure is to build gcc 4.2.1 linux-host linux-target, then use that to build 4.2.1 linux-host mingw32-target |
01:14 | <@ToxicFrog> | And then use that to build 4.2.1 mingw32-host mingw32-target. |
01:15 | <@ToxicFrog> | This is more complicated than it sounds, sadly. |
01:15 | <@McM[SanDiego]> | Heh. |
01:15 | <@McM[SanDiego]> | Having built ARM dev platforms on Linux, I feel your pain. |
01:15 | <@McM[SanDiego]> | "I have finally decided to take the plunge. Last night I upgraded my Vista desktop machine to Windows XP... Windows XP has quite a cartoony look and feel compared to the slick look of Aero Glass; this is mostly offset by the lack of strange screen artifacts caused by malfunctioning graphics code." |
01:16 | <@ToxicFrog> | I don't just need to build an SGOS dev platform on Linux. |
01:16 | <@McM[SanDiego]> | http://dotnet.org.za/codingsanity/archive/2007/12/14/review-windows-xp.aspx |
01:16 | <@ToxicFrog> | I need to build a SGOS dev platform for linux, and an SGOS dev platform for windows, using the same code and, ideally, the same compiler. |
01:17 | <@ToxicFrog> | And for added fun gcc depends on three external libraries, binutils (which can be integrated into its build system) and gmp and mpfr (which AFAICT cannot, and furthermore the site for the latter is down) |
01:17 | <@ToxicFrog> | So I need to make sure those match, too. |
01:18 | <@McM[SanDiego]> | Yes |
01:18 | <@McM[SanDiego]> | My claim was that even just building ONE cross-compiler is bad enough, so having to make it work for three across OSes must be even worse. |
01:21 | | ilf_AFK is now known as ilovefire |
01:21 | <@ToxicFrog> | Aah. Yes. |
01:21 | <@ToxicFrog> | Fortunately a SGOS-target build system differs from a mingw32-target one only in installation. |
02:03 | | gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has quit [Quit: Z?] |
02:15 | | * Vornicus floons |
02:15 | < Vornicus> | Arg. I keep going back to VornLink |
02:49 | | * Vornicus tries to figure out how big 1 unit from the ruby console is, according to Sketchup. |
03:27 | | * Vornicus gnargs. Can't concentrate on anything today. |
03:27 | <@ToxicFrog> | Argh |
03:27 | <@ToxicFrog> | Symlinks are resolved relative to pwd, rather than the directory containing the symlink |
03:27 | < Vornicus> | ew |
03:30 | | * ToxicFrog eyes bash's tab completion |
03:30 | < Vornicus> | does ln absolutify the path you give it? |
03:30 | <@ToxicFrog> | Not unless you ask. |
03:30 | <@ToxicFrog> | $ ln -s /some/other/path foo |
03:30 | <@ToxicFrog> | $ pwd |
03:30 | <@ToxicFrog> | /bar/baz |
03:30 | <@ToxicFrog> | $ cd foo; pwd |
03:30 | <@ToxicFrog> | /bar/baz/foo |
03:31 | <@ToxicFrog> | And if you type: ls ../<tab><tab>, it gets resolved for /bar/baz. |
03:31 | <@ToxicFrog> | However, if you actually run ls .., it gets /some/other/, since that's what /some/other/path/foo/.. really is. |
03:32 | < Vornicus> | ok that's pretty confusing. |
03:32 | <@ToxicFrog> | Yes ;.; |
03:32 | | * ToxicFrog runs around relinking his cross-compile environment |
03:34 | | Reiver [~reaverta@Admin.Nightstar.Net] has quit [Ping Timeout] |
03:36 | | DiceBot [~Reiver@Nightstar-10536.xdsl.xnet.co.nz] has quit [Ping Timeout] |
03:36 | <@ToxicFrog> | Can any of you reach http://www.mpfr.org/ ? |
03:37 | | DiceBot [~Reiver@Nightstar-10536.xdsl.xnet.co.nz] has joined #Code |
03:37 | | mode/#code [+v DiceBot] by ChanServ |
03:38 | | Forj [~Forj@Nightstar-1707.ue.woosh.co.nz] has joined #code |
03:38 | | mode/#code [+o Forj] by ChanServ |
03:38 | < Vornicus> | Doesn't look it. |
03:40 | | Reiver [~reaverta@Admin.Nightstar.Net] has joined #Code |
03:40 | | mode/#code [+o Reiver] by ChanServ |
03:43 | | * Vornicus eyes. |
03:44 | < Vornicus> | I think I might know how combat in KB works, and I haven't even found it in my reverse engineering of KB. |
03:46 | < Vornicus> | And the reason I think I know it is because in osme ways it is similar to the combat mechanics in another game: MoO. |
03:47 | | * ToxicFrog ponders his build sequence for the native compiler. |
03:47 | <@ToxicFrog> | GMP, then MPFR, then bootstrap gcc with GMP and MPFR, then rebuild them with the new gcc, then rebuild the new gcc with the new libraries. |
03:47 | <@ToxicFrog> | That should give me a native 421 gcc, using binutils and libraries also compiled by 421 gcc. |
03:49 | <@ToxicFrog> | Sound sane? |
03:49 | | * Vornicus denies all knowledge of building. |
03:50 | <@ToxicFrog> | Man, using -j3 makes a lot of difference in build speed. |
03:51 | < Vornicus> | Quite. |
03:52 | <@ToxicFrog> | I wonder how far up I could kick it before the bottleneck is CPU rather than IO |
03:54 | | ilovefire [~santros_v@209.82.191.ns-11321] has quit [Quit: Shut up ya wee CROTCH-GNOME, afore I take me hammer an' wail on me jimmies!] |
04:15 | | DiceBot [~Reiver@Nightstar-10536.xdsl.xnet.co.nz] has quit [Ping Timeout] |
04:15 | | DiceBot [~Reiver@Nightstar-10536.xdsl.xnet.co.nz] has joined #Code |
04:15 | | mode/#code [+v DiceBot] by ChanServ |
04:42 | | * Vornicus fiddles. Needs to actually slog his way through the cracks in KB/C64, to get to the meat. |
04:46 | <@ToxicFrog> | -j4 appears to be the point where both CPUs max out |
05:07 | < Vornicus> | It would help, really, if I had some idea how the C64 shell stuff worked. |
05:39 | < Vornicus> | ...I still think it would be awesome for the 1541 emulator to make noises like an actual 1541. |
06:08 | | * Vornicus tries to remember how to use c1451 |
06:08 | < Vornicus> | or whatever the hell it's called. |
06:23 | < Vornicus> | ...helps to spell it right. |
06:26 | < Vornicus> | ...well, that's not a very good, uh. |
06:27 | < Vornicus> | .C:204a 4C 4C 61 JMP $614C <--- first instruction of any meaning in this loader. |
06:28 | < Vornicus> | .C:614c FF FF FF ISB $FFFF,X <--- the target of this instruction is filled with fffffffs for several hundred bytes, and then switches to 00s, which are BRK. |
06:29 | < Vornicus> | ISB doesn't seem to mean anything. |
06:32 | < Vornicus> | ...indeed, the data doesn't even get that far. |
06:32 | < Vornicus> | ...oh, oops. |
06:33 | | * Vornicus is dumb, it's working in hex. |
06:34 | | * Vornicus starts from $0801, not $2049, and gets something that's probably more sensical. |
06:49 | | * Vornicus eyes. Okay, what's it doing, incrementing the IO register? |
07:31 | < Vornicus> | ...hell. okay, need to figure out where it's putting those, because if it's putting them where it looks like it might be then there's going to be trouble. |
07:34 | | * Vornicus just watched it jsr. the system stack is said to be in $01xx, but the program /just filled those/. |
07:41 | | * AnnoDomini really doesn't like that mIRC doesn't have a goto-end-of-file function ANYWHERE in its file handling. One has to specify that the input point should be the number of lines in a file +1. This will FAIL, allegedly, displaying an appropriate message, but it will actually set the input point at the end of the file. |
07:49 | <@McM[SanDiego]> | Vorn: It sounds like you're hacking C64 code. |
07:49 | <@McM[SanDiego]> | One moment while I read backscroll. |
07:50 | <@McM[SanDiego]> | ISB is a "fake instruction", and the C64 BIOS does alternating mem fills of FFFFFFF and 0000000. |
07:50 | < Vornicus> | I'm seeing that. |
07:50 | <@McM[SanDiego]> | Which I/O register is being incremented? |
07:50 | <@AnnoDomini> | Halt and Catch Fire? :p |
07:51 | <@McM[SanDiego]> | No, though those exist. VICE disassembles them as "JAM". |
07:51 | < Vornicus> | 0x0001: R6510, 8510 On-Chip 8-bit I/O Register |
07:51 | <@McM[SanDiego]> | ISB does something weird to several registers, because of don't-cares in the Karnaugh map for 6510 instruction decoding. |
07:51 | <@McM[SanDiego]> | So, you're seeing "INC $01"? |
07:51 | < Vornicus> | Exactly that. |
07:52 | <@McM[SanDiego]> | Is this followed by a write to $00? |
07:52 | <@McM[SanDiego]> | Or preceded by it? |
07:52 | < Vornicus> | Neither. |
07:52 | <@McM[SanDiego]> | Hmmm. |
07:52 | < Vornicus> | Hang on while I get the exact opcodes back |
07:52 | <@McM[SanDiego]> | $00 and $01 control bankswitching, and I'd have to do some heavier research to make sure. |
07:53 | <@McM[SanDiego]> | Also, are you sure you aren't disassembling some data? |
07:53 | < Vornicus> | I am absolutely certain. |
07:53 | <@McM[SanDiego]> | Oh, wait, we went through this. |
07:53 | <@McM[SanDiego]> | My guess is that it's exploiting default values somehow to use that to switch out the BASIC ROM for the RAM "beneath" it. |
07:54 | <@McM[SanDiego]> | Thus freeing all of $0800-$CFFF as a clean bank of memory. |
07:54 | < Vornicus> | There's a line of BASIC: 1680 SYS2049, and then that jumps to somewhere nearby, where it does that, then loads $00FA to $01F9 inclusive using a memcpy, then jumps to $0100. |
07:55 | <@McM[SanDiego]> | JMP $0100 or JMP ($0100)? |
07:55 | < Vornicus> | The former. |
07:55 | <@McM[SanDiego]> | I... see. |
07:55 | <@McM[SanDiego]> | So, the stack starts at $01FF and goes down, so that probably won't be stomped for awhile. |
07:55 | <@McM[SanDiego]> | But. |
07:56 | <@McM[SanDiego]> | What's the code that's copied? |
07:56 | <@McM[SanDiego]> | And is there any TXS wackiness going on? |
07:57 | < Vornicus> | Well, first it does another memcpy, to $071C, and then it JSRs to $0723 |
07:57 | < Vornicus> | I don't see any TSX's. |
07:57 | <@McM[SanDiego]> | TXS, not TSX. OK, so it's inheriting tha from the BIOS. |
07:57 | < Vornicus> | TXSes. |
07:57 | < Vornicus> | Neither of those. |
07:57 | < Vornicus> | tha? |
07:57 | <@McM[SanDiego]> | k |
07:58 | <@McM[SanDiego]> | that. |
07:58 | <@McM[SanDiego]> | "That" being "S". |
07:58 | < Vornicus> | Stack? |
07:58 | <@McM[SanDiego]> | Stack pointer, yes. |
08:00 | <@McM[SanDiego]> | That's doing some smashings. |
08:00 | <@McM[SanDiego]> | Just sitting at the READY prompt appears to have the SP at f3. |
08:00 | < Vornicus> | okay, so right now, just before the JSR, we have f6 as the SP, so... yeah. Okay, I think I have it under control, momentarily. |
08:01 | <@McM[SanDiego]> | Yeah, I guess the right move is to do stepping. |
08:01 | <@McM[SanDiego]> | If you can jump to monitor in the middle of the game and get a PC (and a stack backtrace!) from there, that also might be a decent shortcut. |
08:01 | | * Vornicus checks. Lo, it does indeed put that onto the stack. Okay, feeling a bit better now. |
08:02 | <@McM[SanDiego]> | Hmm |
08:03 | <@McM[SanDiego]> | After the inc $01, can you do a memory dump of $a000? |
08:03 | < Vornicus> | Okay, but I have to restart the emulator. One moment. |
08:03 | < Vornicus> | ...actually I can do that now, because it hasn't done anything up there since. |
08:03 | <@McM[SanDiego]> | If it's got the FFFFFF/0000 blocks, then the inc $01 was to make the BASIC ROM go away. |
08:03 | < Vornicus> | 55 00 00 00 00 .... |
08:04 | <@McM[SanDiego]> | How far until there's Stuff? |
08:04 | < Vornicus> | So yeah, looks like basic rom went away. the 55 is kinda random, but |
08:04 | <@McM[SanDiego]> | (That isn't 000/FFF) |
08:04 | <@McM[SanDiego]> | Aha. |
08:04 | <@McM[SanDiego]> | OK, that's what that was, then. |
08:05 | < Vornicus> | at least to $b000... |
08:06 | < Vornicus> | Part of the problem is I have poisoned data; the game didn't come with an unused template game for it to mangle for use as a save. |
08:08 | < Vornicus> | Which is partially alleviated by the fact that I /have/ the map data, if I need it. |
08:08 | <@McM[SanDiego]> | Nod |
08:09 | <@McM[SanDiego]> | OK, studying this more fully, "INC $01" will end up swapping out BASIC, the BIOS, and the I/O devices. |
08:10 | < Vornicus> | Okay. |
08:10 | <@McM[SanDiego]> | I will guess that there will be another write to $01 to at least re-set bit 2 of $01, because otherwise you can't reach the SID and the VIC-II. Probably also bit 1, so that the BIOS can handle I/O. |
08:11 | <@McM[SanDiego]> | (Check $E000-$FFFF as well) |
08:12 | <@McM[SanDiego]> | I'm not sure how INC works on lines you aren't supposed to be reading. |
08:12 | < Vornicus> | looks likt that's a lot of blank space too... |
08:13 | < Vornicus> | There are some small spots with stuff going on though |
08:14 | <@McM[SanDiego]> | Yeah, OK, on poweron there's all kinds of wackiness there. |
08:15 | <@McM[SanDiego]> | I guess the last check is d000, which should be dumping the character maps on you. |
08:15 | <@McM[SanDiego]> | (Poweron is 00 00 00 00 00 00 00 00 twice, then 00 9b 37 00) |
08:15 | < Vornicus> | last check? |
08:16 | <@McM[SanDiego]> | To see if it flipped all the memory banks. |
08:16 | < Vornicus> | I don't see what you're getting at? |
08:16 | < Vornicus> | Oh, this is the poweron operation of the machine? |
08:16 | | * McM[SanDiego] is still tyring to work out what's going on with the INC $01. |
08:16 | <@McM[SanDiego]> | Yeah, I've got VICE running after finishing its bootup, with default memory map |
08:17 | <@McM[SanDiego]> | So far, we've confirmed that BASIC and KERNAL are gone, but not that I/O is (or rather, not that CHARGEN is present). |
08:17 | <@McM[SanDiego]> | If you can list off d000-d010, I can confirm that. |
08:17 | < Vornicus> | whole lotta nothing |
08:18 | <@McM[SanDiego]> | Hmm. Not what I was expecting, actually~ |
08:18 | <@McM[SanDiego]> | Sounds like the I/O registers are still there. |
08:19 | < Vornicus> | It should be noted that during all this operation the interrupts are off. |
08:22 | <@McM[SanDiego]> | Nod |
08:23 | | * McM[SanDiego] was expected d000-d008 to be "3c 66 6e 6e 60 62 3c 00", which is the bitmap for @. |
08:23 | | * Vornicus remembers making custom bitmaps. |
08:24 | <@McM[SanDiego]> | Hum |
08:25 | <@McM[SanDiego]> | I just ran INC $01 in the monitor and it did change it. What's $00? |
08:25 | <@McM[SanDiego]> | (For that matter, what's $01 after the INC?) |
08:25 | < Vornicus> | 2f 38 |
08:27 | <@McM[SanDiego]> | OK, WTF |
08:27 | <@McM[SanDiego]> | INC $01 in the monitor is for some reason incrementing it twice. |
08:27 | < Vornicus> | ...bizarre |
08:28 | <@McM[SanDiego]> | And I can catch it at $37, $38, and $39. |
08:28 | <@McM[SanDiego]> | However, $38 ought to have CHARGEN active. You're sure d000-d008 is blank? |
08:29 | < Vornicus> | Certain |
08:29 | | * McM[SanDiego] is bafled. |
08:29 | <@McM[SanDiego]> | baffled, too. |
08:29 | <@McM[SanDiego]> | That flies in the face of pages 260-261 of the C64PRG. |
08:32 | | * Vornicus ponders |
08:34 | | * Vornicus eyes. |
08:34 | < Vornicus> | Okay, I don't pretend to know what's happening. |
08:35 | < Vornicus> | What happens to chargen's data to make it accessible later? |
08:36 | <@McM[SanDiego]> | Normally, CHARGEN is wired directly to VIC-II and the CPU doesn't see it at all. |
08:36 | < Vornicus> | Okay, but... I thought there was a way to customize characters. |
08:36 | <@McM[SanDiego]> | There is. You can tell the VIC-II to get it from somewhere else. |
08:36 | < Vornicus> | /ah/ |
08:37 | <@McM[SanDiego]> | Setting bit 2 of $01 low while bit 2 of $00 is high remaps $D000-$DFFF away from the I/O Control registers and to the Character ROM. |
08:37 | <@McM[SanDiego]> | Which is handy if you only want to change some characters. |
08:38 | <@McM[SanDiego]> | See pages 103 and 104. Basically, the VIC-II will see the Character ROM half the time, in hardcoded locations that are never $D000-$DFFF. =P |
08:39 | < Vornicus> | I don't have the physical book. |
08:39 | | * Vornicus is using the online version, which only sometimes separates by pages. Which is, suffice it to say, /annoying/. |
08:40 | <@McM[SanDiego]> | Search for "LOCATION OF CHARACTER MEMORY*" |
08:40 | <@McM[SanDiego]> | With asterisk. |
08:40 | < Vornicus> | Not that easily searched, either. Stupid thing. |
08:41 | | * McM[SanDiego] is just using less. |
08:41 | | * McM[SanDiego] has his pre-split up into chapters, though. |
08:41 | < Vornicus> | The one online is split up much deeper than chapters; it will break on pages, and it will break on headings. |
08:41 | < Vornicus> | And this is very annoying. |
08:42 | <@McM[SanDiego]> | Aha. |
08:42 | <@McM[SanDiego]> | By "online" I thought you meant "Big old .txt file" |
08:42 | < Vornicus> | Yeah, not quite |
08:42 | <@McM[SanDiego]> | ... which I can probably upload for you, i fyou want it. +=P |
08:42 | | mode/#code [+o Vornicus] by ChanServ |
08:42 | <@Vornicus> | http://www.devili.iki.fi/Computers/Commodore/C64/Programmers_Reference/ <--- |
08:43 | <@McM[SanDiego]> | Ah, yes. |
08:43 | <@McM[SanDiego]> | Grab the etext version. |
08:43 | <@McM[SanDiego]> | It is made of win and kittens. |
08:44 | <@McM[SanDiego]> | Well, it doesn't have the diagrams. |
08:44 | <@McM[SanDiego]> | But it is at least searchable. |
08:44 | <@Vornicus> | aha |
08:44 | <@McM[SanDiego]> | And it's linked from that page. |
08:44 | | * Vornicus gives the kittens all 10s. the win is still to be judged. |
08:47 | <@Vornicus> | ooh, win. |
08:50 | <@Vornicus> | hrm. I don't know what that one does either: storing 0 in $10 |
08:51 | <@Vornicus> | " SUBFLG 0010 16 Flag: Subscript Ref / User Function Call" |
08:52 | <@McM[SanDiego]> | Everything from $02-$7F is only used by the BASIC ROM. |
08:52 | <@McM[SanDiego]> | (And $80-$FF is reserved by the KERNAL) |
08:52 | <@Vornicus> | Aha. Okay, so it's perfectly all right stomping around in there. |
08:52 | <@McM[SanDiego]> | It seems to just be trashing BASIC"s memory area. |
08:53 | <@Vornicus> | Well, it's also trashed the top few bytes of KERNAL's, but I think it's okay with that too, seeing what it did to the poor I/O flags. |
08:53 | | * McM[SanDiego] 's crt0.oph pre-trashes BASIC's memory space, but backs it up at the top of RAM |
08:53 | <@McM[SanDiego]> | ... it occurs to me that I could actually back it up in the RAM underneath the KERNAL. |
08:57 | <@Vornicus> | LDX $FB sets N, right? |
09:00 | <@Vornicus> | ...okay, the reference and VICE's monitor may use different names for things. |
09:01 | <@Vornicus> | Oh, wait, duh, it's a zero page. |
09:01 | <@Vornicus> | Not an immediate. |
09:01 | <@McM[SanDiego]> | ldx #$FB does set N, though =P |
09:05 | <@Vornicus> | Quite. |
09:12 | | You're now known as TheWatcher |
09:12 | | * Vornicus watches it tick. |
09:12 | | * AnnoDomini ponders how to make his Snake in VHDL behave without the odd thing where it takes one move in the opposite direction as the key pressed, and then reverses direction to go the right way. |
09:35 | | AnnoDomini [AnnoDomini@83.21.25.ns-3548] has quit [Ping Timeout] |
09:39 | | Chalcedon [~Chalcedon@Nightstar-1707.ue.woosh.co.nz] has quit [Quit: Gone] |
09:40 | | * Vornicus tries to figure out what the hell LDA($FF,X) actually does. |
09:40 | <@McM[SanDiego]> | o_O_O_O_O_o |
09:41 | <@McM[SanDiego]> | "Horrible things to the chip." |
09:41 | <@McM[SanDiego]> | Are you in the loader code still or is this the game proper? |
09:41 | <@Vornicus> | This is still loader code. The loader is doing things, and I'm trying to figure out what. |
09:41 | <@McM[SanDiego]> | It treats memory location X-1 as a 16-bit little-endian pointer and dereferencesi t. |
09:41 | <@Vornicus> | Six eyes. Wow. |
09:42 | <@McM[SanDiego]> | If X is 0, $FF is the low byte and $00 -- the I/O Directional register -- is the high byte. |
09:42 | <@Vornicus> | it's, uh. |
09:42 | <@Vornicus> | Negative if it lands there. |
09:42 | <@Vornicus> | You get there via a BMI |
09:42 | | AnnoDomini [AnnoDomini@Nightstar-29660.neoplus.adsl.tpnet.pl] has joined #Code |
09:42 | | mode/#code [+o AnnoDomini] by ChanServ |
09:42 | <@Vornicus> | Which I guess is a bit more sane. |
09:43 | | Forj [~Forj@Nightstar-1707.ue.woosh.co.nz] has quit [Quit: Gone] |
09:57 | <@Vornicus> | ....okay, how do I just make it /go/? |
09:58 | <@McM[SanDiego]> | "exit" is the VICE monitor command. |
09:58 | <@McM[SanDiego]> | To leave the monitor, that is. |
09:58 | <@Vornicus> | That's what I want. |
09:59 | <@Vornicus> | ...I still think the 1541 emulator needs drive sounds. |
10:01 | <@Vornicus> | ...yes, thank you, that's not the one I wanted, let's try this again. |
10:03 | <@McM[SanDiego]> | Perhaps "until" is what you want? |
10:04 | <@Vornicus> | No, I pressed the wrong button. I wanted to start a new character, not load a game. |
10:04 | <@Vornicus> | And of course once you choose to load, no buttons - not even run/stop - cancel. |
10:05 | <@McM[SanDiego]> | Snerk |
10:05 | <@McM[SanDiego]> | Run/Stop is the first to go. |
10:05 | <@McM[SanDiego]> | RESOTRE (PgUp), however, is tied directly to the NMI line. |
10:05 | <@Vornicus> | You'd expect them to /hook/ it, not destroy it. |
10:06 | <@McM[SanDiego]> | Run/Stop isn't the hookable one. It's RESTORE that produces the interrupt. |
10:06 | <@Vornicus> | Ah |
10:07 | | * Vornicus should try Restore then. Not right now though, he's trying to get to the "existing save" check. |
10:07 | <@McM[SanDiego]> | (IIRC, the default NMI routine checks to see if RUN/STOP is being prsesed and does a soft-reset if it is) |
10:07 | <@McM[SanDiego]> | (This is usually hooked to an ignore) |
10:08 | <@Vornicus> | ...oh, that's why I have "Run/Stop Restore" burned into my mind. |
10:08 | <@Vornicus> | It's the three-finger salute. |
10:08 | <@McM[SanDiego]> | But is instead the 17-hit-combo-in-the-face salute, since it's a keyscan, not a real event queue. |
10:09 | <@McM[SanDiego]> | So you usually had to pound the Hell out of Restore while holding Run/Stop down. |
10:09 | <@McM[SanDiego]> | ... and the emulator somehow duplicates this, and I don't know why or how. |
10:09 | <@Vornicus> | aahaahaaaaa |
10:11 | <@McM[SanDiego]> | ? |
10:11 | <@Vornicus> | the pounding the hell out of restore. |
10:11 | <@McM[SanDiego]> | Flashbacks, eh? |
10:11 | <@Vornicus> | Pretty much, yeah. |
10:11 | <@McM[SanDiego]> | (For added fun, the keyboard and Joystick Port 1 interfere with each other.) |
10:12 | <@Vornicus> | (oh. |
10:12 | <@Vornicus> | (so /that/'s why everything wants port 2) |
10:13 | <@McM[SanDiego]> | (On the other hand, it means that you can check port 1 by using GET A$ in BASIC programs~) |
10:13 | <@Vornicus> | (heh) |
10:13 | <@Vornicus> | (what'd they map to?) |
10:14 | <@McM[SanDiego]> | (Random stuff. I'd just go into quote mode and move the joystick appropriately.) |
10:14 | <@Vornicus> | ...this is a busy wait loop. |
10:15 | <@McM[SanDiego]> | Hmm. Has NMI been remapped? |
10:15 | <@Vornicus> | How do I tell? |
10:15 | <@McM[SanDiego]> | ... damn. |
10:15 | <@McM[SanDiego]> | I was hoping you remembered that part~ |
10:15 | <@Vornicus> | Remember? I never did that. |
10:15 | <@McM[SanDiego]> | There are a couple of ways to get regular interrupts on a C64, and I only have vague memories. |
10:15 | <@McM[SanDiego]> | Both are in the PRG. |
10:15 | <@Vornicus> | Heh |
10:16 | <@McM[SanDiego]> | One involves actually rewriting the vectors at the very bottom of memory, at $FFFA-$FFFF. |
10:16 | <@McM[SanDiego]> | There's another place where you can make NMI do something. |
10:16 | <@McM[SanDiego]> | And you can tell the VIC-II to throw an IRQ at you at scanline X. |
10:17 | | * Vornicus examines this code. |
10:19 | <@McM[SanDiego]> | Actually, that other plice might have been IRQ, not NMI |
10:19 | <@Vornicus> | Okay. At this point it's waiting for a keypress. Let's see, how do I press A. |
10:19 | <@McM[SanDiego]> | I suggest doing an "until" until you're out of the busywait loop. |
10:20 | <@Vornicus> | Yeah, thing is I can't really tell the extents. It's big. |
10:20 | <@Vornicus> | (I think it's running an RNG, too, and it's got about a bazillion things going on, and it's spaghettified) |
10:20 | <@McM[SanDiego]> | Blurgh. |
10:20 | <@McM[SanDiego]> | Even more fun if it's been auto-peephole-optimized. |
10:21 | <@Vornicus> | Possibly. |
10:22 | <@McM[SanDiego]> | (JSR X; RTS -> JMP X, for instance) |
10:22 | <@McM[SanDiego]> | (all over Gradius) |
10:22 | <@Vornicus> | Okay. Inserted disk b... now I need to hit return and see where it lands, so I can see how it's checking for dirtyness. |
10:23 | <@Vornicus> | ...which means I have to be faster than the emulator, so I have to do this from the monitor. How do I tell the monitor to press a key for me? |
10:23 | <@Vornicus> | specifically return? |
10:24 | <@McM[SanDiego]> | I honestly have no idea. |
10:24 | <@Vornicus> | ah, jeez. |
10:24 | <@McM[SanDiego]> | I'd look for a JSR to getin and see where the dataflow goes. |
10:27 | <@McM[SanDiego]> | Then "until" the target of that jump. |
10:27 | <@McM[SanDiego]> | ... OH SHIST |
10:27 | <@McM[SanDiego]> | Or |
10:27 | <@McM[SanDiego]> | (Oh schist! Geological swearing.) |
10:27 | <@McM[SanDiego]> | Find the call to getin |
10:27 | <@McM[SanDiego]> | Once it returns 0, overwrite the accumulator with 13. |
10:28 | <@Vornicus> | There's a couple of them. I really wish these things were commented, I can't tell which one I'd hit for hitting return. |
10:28 | <@Vornicus> | ...what? |
10:29 | <@Vornicus> | What's a call to getin look like? |
10:29 | <@Vornicus> | ah, jsr $ffe4. |
10:30 | <@Vornicus> | ...that didn't work. |
10:30 | <@Vornicus> | shit. |
10:30 | <@Vornicus> | It never called it. |
10:32 | <@Vornicus> | ...now how do I get it to stop untilling. |
10:33 | <@Vornicus> | NO I WANT MY MONITOR BACK DAMN YOUR EYES |
10:35 | <@Vornicus> | ...fuck, that killed the thing. |
10:36 | | * Attilla wonders what Vorn's monologue means |
10:36 | <@Vornicus> | Monitor: the really powerful debugger attached to VICE |
10:37 | <@Vornicus> | getin is a kernel function on the C64, it reads the keyboard buffer and returns a character. |
10:37 | < Attilla> | Ah. I thought somehow your monitor died. |
10:38 | <@Vornicus> | So, looking for where it pressed a key, I asked it to run until it hit a breakpoint I put at the start of the getin function. |
10:38 | <@Vornicus> | ...except that it was never called! |
10:41 | <@Vornicus> | So it's doing something else, and I can't tell what because this code is horrible and awful. |
10:41 | <@McM[SanDiego]> | A monitor is a register-level program debugger, and will usually let you spy on peripheral status and the like as well. |
10:41 | <@Vornicus> | And the thing is, I couldn't make the monitor give me a command thingy instead of saying "until yadda yadda" |
10:42 | <@Vornicus> | so I tried ctrl-c |
10:43 | <@Vornicus> | Recommendation: don't try ctrl-c |
10:45 | <@Vornicus> | (it killed VICE as a whole) |
10:48 | <@McM[SanDiego]> | What happens if you Alt-M again? |
10:48 | <@Vornicus> | It hops back over to the window, and drops me immediately into the until, do not pass go, do not collect $200. I tried it. |
10:49 | <@McM[SanDiego]> | Damn. |
10:49 | <@McM[SanDiego]> | ... I suppose the smart thing to do would be to breakpoint every call to getin in advance. |
10:49 | <@Vornicus> | Well, no, it wasn't the calls /to/ getin, it was the starting point /of/ getin that I was watching. |
10:50 | <@Vornicus> | It never got called. |
10:50 | <@McM[SanDiego]> | Hrm |
10:50 | <@McM[SanDiego]> | ... oh, right. |
10:50 | <@Vornicus> | ? |
10:50 | <@McM[SanDiego]> | The KERNAL had been swapped out. |
10:50 | <@McM[SanDiego]> | getin no longer exists. |
10:50 | <@Vornicus> | This is nowhere near where the kernal got swapped out; I bet it got swapped back in at some point. |
10:50 | | * McM[SanDiego] would verify that with m. |
10:51 | <@Vornicus> | >C:ffe4 6c 2a 03 6c 2c 03 4c 9b f6 4c 05 e5 4c 0a e5 4c l*.l,.L..L..L..L |
10:51 | <@Vornicus> | >C:fff4 00 e5 52 52 42 59 43 fe e2 fc 48 ff 2f 36 00 00 ..RRBYC...H./6.. |
10:51 | <@Vornicus> | >C:0004 00 00 72 65 ff ff 29 f1 00 00 00 00 00 00 00 00 ..re..)......... |
10:51 | <@McM[SanDiego]> | Just so. |
10:51 | <@Vornicus> | (ffe4 is the location of getin) |
10:51 | <@Vornicus> | which is just so? |
10:52 | <@McM[SanDiego]> | "OK, that's not it" |
10:52 | <@Vornicus> | kernal is in? |
10:52 | <@McM[SanDiego]> | Yeah |
10:52 | <@McM[SanDiego]> | Note how every fourth value is "6c"~ |
10:53 | | * McM[SanDiego] then pauses for a moment to eye the fuck out of that. |
10:53 | <@Vornicus> | http://rafb.net/p/cHCeq178.html <--- the cycle it's in right now. |
10:53 | <@McM[SanDiego]> | If I read that right, it's "JMP $032A", which is horrifically wrong. |
10:54 | <@McM[SanDiego]> | ... I am reading it rwong. |
10:54 | <@McM[SanDiego]> | It's JMP ($032A). |
10:54 | <@McM[SanDiego]> | What's in $032A? |
10:54 | <@McM[SanDiego]> | That isn't in a ROM! |
10:54 | <@Vornicus> | >C:032a 3e f1 2f f3 66 fe a5 f4 ed f5 42 0e 08 de e0 00 >./.f.....B..... |
10:54 | <@McM[SanDiego]> | OK, $f13e is in a rom. |
10:55 | <@McM[SanDiego]> | Still. Creepy. |
10:55 | <@Vornicus> | O.o |
10:56 | <@McM[SanDiego]> | I guess you can override getin's vectors. |
10:57 | <@Vornicus> | NDX 00C6 198 No. of Chars. in Keyboard Buffer (Queue) <--- I think I see what it's doing. |
10:57 | <@McM[SanDiego]> | Mmm |
10:57 | <@Vornicus> | (the inner wait routine checks this, then if it's empty jumps to the end of the function) |
11:16 | <@Vornicus> | ...what evil is this thing doing? |
11:18 | <@Vornicus> | Okay. Check the keyboard queue, dump that into X, then declare the queue empty... then load from $0276+X... |
11:18 | <@Vornicus> | This is all mass insanity. What the hell is it doing? |
11:19 | <@McM[SanDiego]> | Do your eally ahve to disassemble the KERNAL here? |
11:20 | <@Vornicus> | This is /in the wait loop/ |
11:21 | <@McM[SanDiego]> | Blergh |
11:21 | <@McM[SanDiego]> | Also, I can't believe they're using the ($nn, X) mode |
11:22 | <@Vornicus> | This is just $nn, X; no parens involved |
11:22 | <@Vornicus> | The thing about $nn, X was in one of the crack loaders. |
11:23 | <@McM[SanDiego]> | Ah, OK |
11:23 | <@Vornicus> | rather, the thing with the parens was in one of the crack loaders. |
11:23 | <@Vornicus> | And crack loaders do some really scary htings, mostly in the name of adding demos to show how cool they are. |
11:24 | | * Reiver arghs, his head is fuzzy. Quick interjection: How many days between 11/09/07 and 21/12/07 (mm/dd/yy), not counting the 11th but counting the 21st? |
11:24 | <@Vornicus> | As though anyone's ever heard of Censor Design/Design Censor |
11:24 | <@McM[SanDiego]> | See, it was to prove they had~ |
11:24 | <@McM[SanDiego]> | I managed to remember Skaven from Way The Leeg Back In The Day. |
11:25 | <@Reiver> | ...uh, dd/mm/yy |
11:25 | <@Vornicus> | 20+31+30+20 -> 101 |
11:25 | <@Vornicus> | Yeah, didn't think you means september of the following year. |
11:25 | <@Reiver> | Given there isn't, you know, a 21st month in existance~ |
11:25 | | * Reiver was /trying/ to be helpful to the americans, failed utterly. |
11:25 | <@Reiver> | 101 days? |
11:25 | <@Vornicus> | yes |
11:26 | <@McM[SanDiego]> | (Skaven did the soundtrack for Bejeweled 2, and was part of The Future Crew.) |
11:26 | | * Reiver keeps getting 102 and wondering where the extra day comes from. |
11:26 | <@Vornicus> | Probably thought September or November had 31. |
11:28 | <@Reiver> | You're counting the 21st, but not counting the 11th, correct? |
11:28 | | * Reiver finds the biggest hassle in this whole thing is the fencepost errors. |
11:28 | <@Vornicus> | Well, I'm counting the 11th but not the 21s |
11:28 | <@Reiver> | But functionally same diff. |
11:28 | <@Vornicus> | Which is the same thing |
11:28 | <@Reiver> | right |
11:40 | <@TheWatcher> | Reiver: perl -e 'use Date::Calc qw(Delta_Days); print Delta_Days(2007, 9, 11, 2007, 12, 21),"\n";' ;P |
11:41 | <@Reiver> | Yeah, but that would require me to install, well, perl~ |
11:42 | <@TheWatcher> | Bah, philistine ;P |
12:02 | | * Vornicus does battle. okay, how to set memory in such a way that it /looks/ like the keybuffer has a return in it. |
12:04 | | * Vornicus examines, finds the things he needs, tries to find the stupid command. I know I had it a minute ago. |
12:39 | <@Vornicus> | gah. Of course the moment I stop caring is the moment I realize that I need to care the most. |
13:23 | | Reiver [~reaverta@Admin.Nightstar.Net] has quit [Quit: Rebooting. If I'm not back in five minutes, you can assume I am not, in fact, a *happy camper*, and am *dancing* with my computer as a result...] |
13:24 | | DiceBot [~Reiver@Nightstar-10536.xdsl.xnet.co.nz] has quit [Quit: DiceBot: based on AnnoDomini's KarmaBot.] |
13:28 | | Reiver [~reaverta@Admin.Nightstar.Net] has joined #Code |
13:28 | | mode/#code [+o Reiver] by ChanServ |
13:43 | | Vornicus is now known as Vornicus-Latens |
13:49 | | gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has joined #Code |
13:49 | | mode/#code [+o gnolam] by ChanServ |
14:58 | | * ToxicFrog headbonks at the gcc mailing list |
15:00 | <@ToxicFrog> | "Hi! I'm building a linux/linux gcc, using that to build a linux/windows gcc, and then using that to build a windows/windows gcc. I built mpfr and gmp, then built the linux/linux and linux/windows gccs fine, but the windows/windows one fails when it tries to link gmp/mpfr. Is this a gcc bug? |
16:09 | <@AnnoDomini> | Explain this to those of us not waist-deep into programming? ;) |
16:37 | <@ToxicFrog> | He's build two linux gccs: one that generates linux programs and one that generates windows programs. |
16:37 | <@ToxicFrog> | The latter, of course, needs windows libraries to link against. |
16:38 | <@ToxicFrog> | He's trying to use this to generate a windows GCC, using the linux libraries. |
16:38 | <@ToxicFrog> | Basically his question boils down to "I'm trying to build a windows program, but when I try to link it against Linux libraries, it doesn't work. Is this a bug in the compiler?" |
16:44 | <@AnnoDomini> | I see. |
17:26 | <@ToxicFrog> | Argh, fucking GCC |
17:27 | | Forj [~Forj@Nightstar-1707.ue.woosh.co.nz] has joined #code |
17:27 | | mode/#code [+o Forj] by ChanServ |
17:47 | | Forj [~Forj@Nightstar-1707.ue.woosh.co.nz] has quit [Quit: Gone] |
18:13 | | AnnoDomini is now known as C`raksh`su |
19:31 | | Chalcedon [~Chalcedon@Nightstar-1707.ue.woosh.co.nz] has joined #code |
19:31 | | mode/#code [+o Chalcedon] by ChanServ |
19:33 | | Forj [~Forj@Nightstar-1707.ue.woosh.co.nz] has joined #code |
19:33 | | mode/#code [+o Forj] by ChanServ |
19:42 | | Chalcedon [~Chalcedon@Nightstar-1707.ue.woosh.co.nz] has quit [Ping Timeout] |
19:43 | | Chalcedon [~Chalcedon@203.211.122.ns-2621] has joined #code |
19:43 | | mode/#code [+o Chalcedon] by ChanServ |
19:48 | | Forj is now known as Chalcy |
19:55 | | Chalcy [~Forj@Nightstar-1707.ue.woosh.co.nz] has quit [Ping Timeout] |
19:55 | | Forj [~Forj@Nightstar-1707.ue.woosh.co.nz] has joined #code |
19:55 | | mode/#code [+o Forj] by ChanServ |
20:30 | | Chalcedon [~Chalcedon@203.211.122.ns-2621] has quit [Quit: Gone] |
20:31 | | Forj is now known as Chalcy |
20:31 | | Chalcedon [~Chalcedon@Nightstar-1707.ue.woosh.co.nz] has joined #code |
20:31 | | mode/#code [+o Chalcedon] by ChanServ |
20:55 | | Chalcy [~Forj@Nightstar-1707.ue.woosh.co.nz] has quit [Connection reset by peer] |
20:58 | | Forj [~Forj@Nightstar-1707.ue.woosh.co.nz] has joined #code |
20:58 | | mode/#code [+o Forj] by ChanServ |
21:25 | | Vornicus-Latens is now known as Vornicus |
21:34 | <@gnolam> | "Java is like a variant of the game of Tetris in which none of the pieces can fill gaps created by the other pieces, so all you can do is pile them up endlessly." |
21:34 | < C_tiger> | Pffft. |
21:35 | | Vornicus [~vorn@76.255.8.ns-26490] has quit [Ping Timeout] |
21:36 | | Vornicus [~vorn@64.252.8.ns-3980] has joined #code |
21:36 | | mode/#code [+o Vornicus] by ChanServ |
22:01 | | * C`raksh`su laughs. |
22:30 | | You're now known as TheWatcher[T-2] |
22:32 | | You're now known as TheWatcher[zZzZ] |
22:45 | | * gnolam shakes his fist at bad web programmers. |
22:47 | <@McM[SanDiego]> | So very very many of them |
22:48 | | * Vornicus once again battles King's Bounty. |
23:51 | | C`raksh`su is now known as AnnoDomini |
--- Log closed Fri Dec 21 00:00:31 2007 |