Register | Login | |||||
Main
| Memberlist
| Active users
| ACS
| Commons
| Calendar
| Online users Ranks | FAQ | Color Chart | Photo album | IRC Chat |
| |
1 user currently in Rom Hacking: |
Acmlm's Board - I2 Archive - Rom Hacking - FCEUXD progress (04-09-05) | | | |
Pages: 1 2 | Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
User | Post | ||
Parasyte Bullet Bill Level: 35 Posts: 425/514 EXP: 267348 For next: 12588 Since: 05-25-04 Since last post: 104 days Last activity: 32 days |
| ||
Ahoy! Regulars in #rom-hacking probably know that I have been updating some pieces of FCEUXD recently. While I don't have a complete list of changes, here are the important ones: 1) A lot of bugs in the memory editor have been fixed, including visual bugs as well as potentially harzardous bugs. 2) PPU Viewer has been updated slightly to use 8-bit bitmaps, rather than 32-bit. This SHOULD help speed things up some. 3) A completely new disassembler has been written. It's no longer using a standard edit control, but a custom control I am writing. This will allow for colors, and other drawn features to aid in debugging. 4) Conditional breakpoints are implimented and fully working! *See below for more information. Here's what the new disassembler looks like, so far: (Click for larger view) Eventually, I want to include jump and branch pointers (Meaning arrows drawn to show where branches and jumps lead) and other features from IDA. It will also be integrated with the memory editor so you may see modified bytes in red and such. Execute breakpoints will display the address(es) in red. Read/write breakpoints will also be shown in different colors (data bytes will be colored in this case). Double clicking an address will add a n execute breakpoint, double clicking bytes will add read/write breakpoints. Single clicking an address or byte will display the "file address" just as the old disassembler's "helper bar" did on mouse-over. A right-click menu will give you access to "Send to Memory Editor" and "Send to GG Encoder" options, among other things. I'm also looking for other suggestions, if anyone has a few. So shoot away! Now for the conditional breakpoints! This is the really interesting part of the post. Originally, I had planned to make conditions similar to C-syntax expressions, such as "A == $30" and "(A != 0) && (A != $FF)", but it would require a compiler to parse the expressions properly. Noting this, I decided to create a pseudo-machine code language to handle the conditions. Oddly enough, I've named it "Pseudo-Machine Code" or PMC. PMC is a very simple assembly-like language with no real syntax specs. Since it's only purpose is for handling breakpoint conditions in FCEUXD exclusively, I have not developed the language much beyond the opcode stage. Now, since I have not written a compiler yet, we are entering our conditionals in raw PMC. Raw PMC looks a lot like just a bunch of hex numbers. And that's because that is exactly what it is! The first PMC program I wrote (by the way, it's pretty interesting creating a new programming language and writting the first program for it) was one to cause a break only when the [PPU] hardware was displaying a certain scanline. This kind of condition is extremely useful for debugging precisely timed code... To help illustrate what a PMC program (condition) looks like, and how it works, I will paste the full contents of the pmc.h include file from the newest build of FCEUXD: /* FCE Ultra - NES/Famicom Emulator Once you've read that, you can take a look at the scanline condition: 022000050510012220 WTF does that mean?! Let's break it down: 02 20 00 LOAD r0,$0020 ;load 32 into r0 As you can see, this PMC will cause a break if the scanline counter is currently at 32 -- scanline 32. So you may place a BPX on the range $0000 - $FFFF, with the above PMC condition. The game will continue running until scanline 32 is reached. Quite a thing of beauty! Some examples of things you can do with PMC conditions: Ignore execution of certain address ranges, ignore breaks when registers contain certain values, ignore breaks that occur outside of Vblank, accurately time your code along with Hblank ... etc! While these things are all well and good, PMC is still lacking some functionality, which will develop over time. Mainly the lack of a compiler or assembler, even though the language is so simple, we're writing it in pure binary. It is also lacking pointer support. With pointer support, you will be able to cause breaks on certain instructions by reading the byte at PC, or watching the stack and other such things. It is quite a powerful conditional sub-system, and I'm a bit proud of it. ;D I would expect to see the next FCEUXD release in a few months or so, if all goes well. (Which probably won't be the case, in all honesty.) OK! Now bring on your suggestions and concerns. (edited by Parasyte on 04-10-05 02:48 AM) |
|||
Setzer Popo Level: 36 Posts: 169/532 EXP: 290182 For next: 17928 Since: 04-22-04 From: Not Florida. because I'm going to sink it. Since last post: 5 hours Last activity: 48 min. |
| ||
I didn't read it all yet; But I want to be the first [on this forum anyways] to say kick ass. edit: Okay, now that I read it. and figured out it's power. the only words I can think of to say are "I love you" and "kick ass" (edited by Skiffles on 04-09-05 03:44 PM) |
|||
iamhiro1112 Armos Level: 35 Posts: 369/487 EXP: 259927 For next: 20009 Since: 03-27-04 From: sd Since last post: 18 days Last activity: 7 days |
| ||
I look forward to the new release. I hope you guys put in programmable keys. As in we can edit what button we can use to access certain features. Right now I use Joy 2 key so that I can save and load with my controller. | |||
HyperLamer <||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people Sesshomaru Tamaranian Level: 118 Posts: 4111/8210 EXP: 18171887 For next: 211027 Since: 03-15-04 From: Canada, w00t! LOL FAD Since last post: 2 hours Last activity: 2 hours |
| ||
Have my baby. I'll have to incorporate a lot of these into my GB emulator on the odd chance I ever finish it. You gonna release that control? |
|||
Geiger Buster Beetle Level: 34 Posts: 350/460 EXP: 241080 For next: 12571 Since: 03-15-04 From: Indianapolis, IN, USA Since last post: 6 hours Last activity: 6 hours |
| ||
02 20 00 LOAD r0,$0020 ;load 32 into r0 How are you specifying r0 and r1 here? ---T.Geiger |
|||
HyperLamer <||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people Sesshomaru Tamaranian Level: 118 Posts: 4113/8210 EXP: 18171887 For next: 211027 Since: 03-15-04 From: Canada, w00t! LOL FAD Since last post: 2 hours Last activity: 2 hours |
| ||
Originally posted by Parasyte Come to think of it, that also answers my question as to why it skips all the odd numbers. (Though why are 6-F skipped? ) Are there going to be compares for >= and <= too? It'd help shorten the code a bit. |
|||
Parasyte Bullet Bill Level: 35 Posts: 427/514 EXP: 267348 For next: 12588 Since: 05-25-04 Since last post: 104 days Last activity: 32 days |
| ||
I'm glad I'm not that one who had to point out the obvious. ;D As for the not-so-obvious, I had no plans for <= or >=, because those can be done with JMPE and JMPL(G) together. Adding them wouldn't really hurt anything, though... Why were some defines skipped? Future expansion! As I mentioned in the initial post, PMC is missing some things, like pointer access. For that, I will probably use a MOVE instruction, located at 0x06... I don't see much use for bitwise logic or arithmetic instructions, but if they are needed, there's still plenty of room for expansion! Also, I'm debating whether I should change the 'compiler specs' so it doesn't use the MSB for labels. Instead, it may be better to keep a local symbol table, with each label referencing it. Though that's a bit out of scope, as it's something the user will never see. [D'oh!] Yes, the control source will be released. Afterall, the whole project always has (and always will be) open source via GPL. (edited by Parasyte on 04-09-05 06:51 PM) (edited by Parasyte on 04-09-05 06:52 PM) |
|||
Kyoufu Kawa I'm not bad. I'm just drawn that way. Level: 70 Posts: 1410/2481 EXP: 3008456 For next: 7355 Since: 03-19-04 From: Catgirl Central Since last post: 14 hours Last activity: 13 hours |
| ||
Well, that makes two acmlmboarders that write their own psuedocode and are proud of it. | |||
Parasyte Bullet Bill Level: 35 Posts: 429/514 EXP: 267348 For next: 12588 Since: 05-25-04 Since last post: 104 days Last activity: 32 days |
| ||
I suppose so! Well, I tried adding the copy/paste functionality to the disassembler control, but got a bit side-tracked and added branch/jump x-ref (Cross-Reference) handling instead. It's a bit primative, at the moment, but it looks really nice. Here's some eye candy: (Bigger images with the clickage!) (edited by Parasyte on 04-10-05 02:48 AM) (edited by Parasyte on 04-10-05 02:49 AM) |
|||
Sokarhacd Ball and Chain Trooper Resistance is Futile You Will Be Assimilated Hab SoSlI' Quch Level: 61 Posts: 1130/1757 EXP: 1799888 For next: 76708 Since: 03-15-04 Since last post: 6 days Last activity: 4 hours |
| ||
awesome, I might have to get back into nes hacking when this is released | |||
Setzer Popo Level: 36 Posts: 170/532 EXP: 290182 For next: 17928 Since: 04-22-04 From: Not Florida. because I'm going to sink it. Since last post: 5 hours Last activity: 48 min. |
| ||
There's no reason not to get back into NES hacking now. the current debugger is fine; they're just re-writing it to be more awesomefull. | |||
Dwedit Shyguy Level: 17 Posts: 21/92 EXP: 20794 For next: 3949 Since: 04-26-04 Since last post: 5 days Last activity: 1 day |
| ||
Conditional logging perhaps? I'd like to log all the output on controller 1's port so I can figure out how the Miracle Piano IO works. | |||
Apophis Red Super Koopa Level: 45 Posts: 448/882 EXP: 640255 For next: 19909 Since: 03-15-04 Since last post: 15 hours Last activity: 15 hours |
| ||
Any idea when we can expect it to be released? I know you said in the next few months, but can you be any more specific? (edited by Apophis on 04-10-05 10:37 AM) |
|||
Googie Surarok Level: 39 Posts: 334/624 EXP: 380784 For next: 23987 Since: 03-15-04 From: Corona Queens New York Since last post: 3 hours Last activity: 3 hours |
| ||
Makin an already awsome program even better? Sign me up! I can't wait for the next release. | |||
Parasyte Bullet Bill Level: 35 Posts: 430/514 EXP: 267348 For next: 12588 Since: 05-25-04 Since last post: 104 days Last activity: 32 days |
| ||
Apophis, I can't be any more specific; it could be sooner, could be later. Depends a lot on how I spend my free time. ;O Dwedit, what exactly do you need? Using breakpoints and copying the addresses down should be enough to get you started, right? That's the method I use when hacking most everything. |
|||
HyperLamer <||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people Sesshomaru Tamaranian Level: 118 Posts: 4152/8210 EXP: 18171887 For next: 211027 Since: 03-15-04 From: Canada, w00t! LOL FAD Since last post: 2 hours Last activity: 2 hours |
| ||
Kickass. Might help to colour the arrows though; I can't follow them very well in some of the more complicated-looking ones. | |||
Dwedit Shyguy Level: 17 Posts: 22/92 EXP: 20794 For next: 3949 Since: 04-26-04 Since last post: 5 days Last activity: 1 day |
| ||
I've mainly been using custom compiles of Nester to log all output on 4016 to a binary file. But it looks like all the piano IO is being written via register A rather than register X, so I'd like a way to log all output from register A to 4016. Then maybe I could somehow analyze it and try to find midi data in there or something. | |||
drjayphd Beamos What's that spell? pimp! Level: 56 Posts: 943/1477 EXP: 1387410 For next: 10766 Since: 03-15-04 From: CT Since last post: 2 hours Last activity: 2 hours |
| ||
Holy crap, someone remembers the Miracle Piano?! How are you even using that? I'd imagine there's enough keys on a keyboard, never mind the controller. | |||
Dwedit Shyguy Level: 17 Posts: 23/92 EXP: 20794 For next: 3949 Since: 04-26-04 Since last post: 5 days Last activity: 1 day |
| ||
For the sound output, I could see using a patch map to translate it into general midi, or maybe just using some sample sets, or possibly even piping it directly into an actual miracle piano (which I have hooked up to my PC!). If you have a MIDI keyboard plugged in, it should be an obvious choice for an input device. For stuff like Rhythm Practice or Robo Man, maybe even a joystick is enough. |
|||
Parasyte Bullet Bill Level: 35 Posts: 432/514 EXP: 267348 For next: 12588 Since: 05-25-04 Since last post: 104 days Last activity: 32 days |
| ||
Dwedit, why can't you just use breakpoints and manually copy [some of] the assembly into notepad? All the cool kids are doing it... But really, I'm not sure why you would need 'conditional logging'? The logger in FCEUXD already does something similar, thanks to the CDL. As for trouble making sense of the x-refs, yes, it can get confusing. I don't know if I want to do arrow highlighting, but I will definitely do special highlights on single click... (Yep! IDA style!) For example, you can click on an address, and all instances of that addresses will be highlighted with a special background color just for this type of highlighting. I suppose it MAY be possible to add arrow coloring, as well. But the main problem I foresee is that destination addresses with many x-refs will ALL have their arrows colored. That would probably not help things in a lot of cases. So rather than basing arrow highlighting on the addresses (x-refs) it might as well be done based on the 'selected' line of disassembly. In that way, it would disregard arrows pointing to the selected line, and color only the arrow leading from it. Hmm, that would actually work quite well in conjuntion with the single-click highlighter. Blah, blah. I think I'm rambling now. It's all this lack-of-sleep, I tell you! (edited by Parasyte on 04-11-05 04:58 AM) |
Pages: 1 2 | Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
Acmlm's Board - I2 Archive - Rom Hacking - FCEUXD progress (04-09-05) | | | |