Kodewerx https://www.kodewerx.org/forum/ |
|
AR to/from CB converter for NDS https://www.kodewerx.org/forum/viewtopic.php?f=11&t=525 |
Page 1 of 6 |
Author: | dlong [ Tue Jan 09, 2007 10:59 am ] |
Post subject: | AR to/from CB converter for NDS |
Is anyone interested if I can find the time? This assumes I can remember how to use the Win32 API or can relearn it quickly. This may be a bad assumption. EDIT: Here it is. |
Author: | Baphomet [ Tue Jan 09, 2007 11:06 am ] |
Post subject: | |
I am. Although, I don't really have any codes that need to be converted. |
Author: | lemmayoshi [ Tue Jan 09, 2007 1:49 pm ] |
Post subject: | |
Yes, very interested. |
Author: | shadowkc [ Tue Jan 09, 2007 4:01 pm ] |
Post subject: | |
Can you convert Kirby Squeak Squad codes over to CB format? |
Author: | Dualscreenman [ Tue Jan 09, 2007 4:42 pm ] |
Post subject: | |
@shadowkc Give one of us hackas the codes and I'm sure something could be worked out. @dlong A converter would make my life easier. |
Author: | DevilLordDiablo [ Tue Jan 09, 2007 6:27 pm ] |
Post subject: | |
If it works better than a PC game with Starforce protection, then certainly. |
Author: | dlong [ Wed Jan 10, 2007 11:51 am ] |
Post subject: | |
I set up the GUI last night and started on the logic today. So far I only have 8-bit CB->AR done, but it's a start. |
Author: | James0x57 [ Wed Jan 10, 2007 2:12 pm ] |
Post subject: | |
Oh cool man! That's great! Good luck with it, dlong! Let me know if there's anything I could do to help. ![]() |
Author: | dlong [ Wed Jan 10, 2007 10:01 pm ] |
Post subject: | |
8-bit, 16-bit, and 32-bit CB to AR are done. I'm going to bed after I get the slide code working. I was going to do a beta release tonight, but I won't have time. I have a 9:25 class tomorrow. I'll probably just wait for CB to AR is done and then do a 0.5 release. |
Author: | dlong [ Wed Jan 10, 2007 10:42 pm ] |
Post subject: | |
Slide code works for CB to AR. Well, almost. It gives an error message regardless. I'll figure that out later. |
Author: | dlong [ Sat Jan 13, 2007 10:56 am ] |
Post subject: | |
Version 0.5 is out. It does CB to AR only. Report any errors here. http://www.utc.edu/Daniel-Long/Converter.exe |
Author: | Mewy [ Sun Jan 14, 2007 1:52 am ] |
Post subject: | |
Wrong, opiside. |
Author: | kenobi [ Sun Jan 14, 2007 3:29 am ] |
Post subject: | |
Just tried it. Typed '02000000 00000000' in the left box (also tried '0200000000000000'), and it says 'unknown code type on line 1' ? Also... The title of the topic says 'AR to CB', but in the thread you say 'CB to AR', and the proggy says 'AR to CB' ? Edit : Darn can't even read properly. The topic's title says 'from/to'. |
Author: | Parasyte [ Sun Jan 14, 2007 4:13 am ] |
Post subject: | |
The finished project should be able to convert between both AR and CB. Currently it only does one way conversion CB -> AR. That should clear up any confusion. As for why it's giving you any errors, I don't know. I have not tried it, since I am on my Mac, and too lazy to go to the Windows machine to try it. |
Author: | dlong [ Sun Jan 14, 2007 11:52 am ] |
Post subject: | |
Yeah, the default is AR->CB, which is unsupported. Also, I can't figure out how to make the combo box drop down farther. Right now you just have to use the scroll. Para? |
Author: | dlong [ Sun Jan 14, 2007 1:01 pm ] |
Post subject: | |
OK, it's fucking stopped working. You may not get a later version, because this bullshit is pissing me off. It won't create the window anymore, even though I DIDN'T FUCKING CHANGE ANY OF THE WINDOW CREATION CODE. Fucking microsoft. This is what I have: ndsconvert.c: Code: int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hprevinstance, LPSTR lpcmdline, int ncmdshow) { MSG msg; ghInstance = hInstance; hWindow = CreateDialog(ghInstance, MAKEINTRESOURCE(IDD_DIALOG), NULL, MainCallB); if (!hWindow) { MessageBox(NULL, "Could not create main dialog", "Error", MB_ICONERROR | MB_OK); return 0; } ShowWindow(hWindow,ncmdshow); UpdateWindow(hWindow); while(hWindow) { if (GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } } return msg.wParam; } resource.rc Code: #include "Resource.h"
#include <windows.h> IDD_DIALOG DIALOG DISCARDABLE 0, 0, 240, 104 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "NDS Code Converter v0.5" FONT 8, "Arial" BEGIN EDITTEXT IDC_INPUT, 0, 0, 85, 95, ES_AUTOHSCROLL | ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL EDITTEXT IDC_OUTPUT, 155, 0, 85, 95, ES_AUTOHSCROLL | ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL COMBOBOX IDC_COMBO1, 85, 0, 70, 30, CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP DEFPUSHBUTTON "&Convert", ID_CONVERT, 85, 40, 70, 15 PUSHBUTTON "Clear", CLEAR_IN, 0, 95, 30, 10 PUSHBUTTON "Clear", CLEAR_OUT, 210, 95, 30, 10 PUSHBUTTON "About", ABOUT, 155, 95, 30, 10 PUSHBUTTON "Version History", VERSION, 30, 95, 54, 10 CONTROL "Enable Error", IDC_ERROR, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 85, 70, 60, 10 CONTROL "Enable Warnings", IDC_WARNING, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 85, 90, 65, 10 LTEXT "Messages", IDC_STATIC, 98, 80, 50, 10 END So what the fuck is going on? Also: Solving Y > ~Z & X for X Would that give me Y | ~Z > X? |
Author: | dlong [ Sun Jan 14, 2007 2:26 pm ] |
Post subject: | |
[16:23:11] <%dlong> omg [16:23:15] <%dlong> you won't believe this [16:23:22] <%dlong> I made a new project [16:23:30] <%dlong> imported the same three code files [16:23:33] <%dlong> compiled it [16:23:35] <%dlong> and it worked So that just leaves two things I need help with right now: -Better Combo Box and -Boolean algebra. Here's why I need the boolean equation solved: AR: Type 7 : 16 bits If (code value)>(mask & data at address) (unsigned) 7XXXXXXX ZZZZYYYY : checks if (YYYY) > (not (ZZZZ) & halfword at [XXXX]). If not, the code(s) following this one are not executed (ie. execution status is set to false) until a code type D0 or D2 is encountered, or until the end of the code list is reached. CB: DXXXXXXX ZZTUYYYY D0 = Code Type Or Byte XXXXXXX = Address ZZ = Lines to skip, 00 means 01 by default T = Condition type to check against 0 = If equal to YYYY 1 = If not equal to YYYY 2 = If lesser than YYYY 3 = If greater than YYYY 4 = If AND YYYY equal to 0000 5 = If AND YYYY not equal to 0000 6 = If AND YYYY equal to YYYY 7 = If AND YYYY not equal to YYYY U = Bit-type Load, 0 for 16-Bit & 1 for 8-Bit YYYY = Conditional Value to check against The AR has the mask, but the CB doesn't. But if I can combined the mask into the condition value, I can still make it work. |
Author: | Parasyte [ Sun Jan 14, 2007 4:42 pm ] |
Post subject: | |
The answer to your first question about the combo box is very simple: just change the combo box height. It is at 30 right now, make it 60 or 90 or ... 32767 FTW. The first thing about converting the == (and !=) conditionals is that if YYYY_AR is 0000, then it is simple to do the conversion: ZZ_CB = proper count T_CB = 4 U_CB = 0 YYYY_CB = ~ZZZZ_AR Similarly, if YYYY_AR = ~ZZZZ_AR, then you can do this: ZZ_CB = proper count T_CB = 6 U_CB = 0 YYYY_CB = ~ZZZZ_AR With a more complex mask or masked > and < conditionals, I figure you'll have to copy the half word to an unused memory location, apply the mask to the new location, then check for the condition on the new location. For example: AR: 72012346 FFF00001 -- Condition: ((*(u16*)0x02012346 & ~0xFFF0) > 0x0001) ? ... ... D0000000 00000000 -- ... end condition Would be converted to: 52000000 00000002 -- Copy 2 bytes to 0x02000000 ... 02012346 00000000 -- ... from 0x02012346 72000000 0011000F -- Apply mask: *(u16*)0x02000000 &= ~0xFFF0 D2000000 zz300001 -- Condition: (*(u16*)0x02000000 > 0x0001) ? ... |
Author: | dlong [ Sun Jan 14, 2007 5:50 pm ] |
Post subject: | |
Is there a memory location that I can write to that is guaranteed not to be used? |
Author: | Parasyte [ Sun Jan 14, 2007 8:56 pm ] |
Post subject: | |
Yes. 0x027FFF60 - 0x027FFF80 is reserved for the Intelligent Systems Debugger, thus unused by any programs. |
Author: | dlong [ Mon Jan 15, 2007 6:27 pm ] |
Post subject: | |
1.0 is up. |
Author: | Rion [ Tue Jan 16, 2007 2:25 pm ] |
Post subject: | |
Is it possible to add AR to Dipstar/CB to Dipstar? Or are the codes to different? //Rion |
Author: | Dualscreenman [ Tue Jan 16, 2007 3:03 pm ] |
Post subject: | |
Do you mean add AR -> Dipstar to the converter? Dipstar and Codebreaker codetypes are very similar and in lots of cases are the same, so I'd say yes. |
Author: | Rion [ Tue Jan 16, 2007 3:43 pm ] |
Post subject: | |
Dualscreenman wrote: Do you mean add AR -> Dipstar to the converter? Dipstar and Codebreaker codetypes are very similar and in lots of cases are the same, so I'd say yes.
Yes thats exactly what i mean. |
Author: | dlong [ Tue Jan 16, 2007 3:45 pm ] |
Post subject: | |
I'd need Dipstar documentation. |
Author: | Rion [ Tue Jan 16, 2007 4:49 pm ] |
Post subject: | |
dlong wrote: I'd need Dipstar documentation.
Here is the official homepage. http://hp.vector.co.jp/authors/VA018359 ... shack.html There's documentation of how to ect in the zipfile for Dipstar. Hope thats all you need = ) Edit: Found this site. Its in Japanese but you can translate it with Altavista/Babelfish. There's something there about Dipstar->ARDS http://mywiki.jp/dipstar/DS%89%FC%91%A2 ... FrontPage/ |
Author: | Dualscreenman [ Tue Jan 16, 2007 6:06 pm ] |
Post subject: | |
[quote=imaha]hasteDS is "not" DipStar. Support code is .. 0XXXXXXX 000000YY 1XXXXXXX 0000YYYY 2XXXXXXX YYYYYYYY only...? Actually, there is a secret code. (GameShark mode) 0300nnnn GroupWrite 030100vv Increment(8bit) 030200vv Decrement(8bit) 0303vvvv Increment(16bit) 0304vvvv Decrement(16bit) 03050000 Increment(32bit) 03060000 Decrement(32bit) 04aaaaaa Repeat/Filler 05aaaaaa Copy bytes 0Caaaaaa execute or ALL-skip 0Daaaaaa 16bit conditional[equal] 0Daaaaaa 16bit conditional[different] 0Daaaaaa 16bit conditional[less than] 0Daaaaaa 16bit conditional[greater than] 0Ennwwww 16bit conditional[equal] -multi line- 0Ennwwww 16bit conditional[different] -multi line- 0Ennwwww 16bit conditional[less than] -multi line- 0Ennwwww 16bit conditional[greater than] -multi line- [/quote] A fair bit of engrish but... |
Author: | DragonCheat [ Wed Jan 17, 2007 5:15 pm ] |
Post subject: | |
I'm confused:? and have 2 problems. When I use ndsconvert 1.0 to convert this Codebreaker code I came up with for Digimon World DS, that I can't use on the Codebreaker because I can't find a working Mastercode, 421db8c8 00280180 00000001 00000000 to an Action Replay code, C0000000 00000028 D3000000 00000000 D2000000 00000000 021DB8C8 00000001 D4000000 00000600 D0000000 00000000 One; the converted code doesn't work right on the Action Replay, it only affects the first digimon instead of all digimon. Two; when I copied and pasted the resulting AR code into the conversion box, after clearing the old codes out and switching to 'AR to CB' mode, to see what would happen going the other way I get this error 'Unconvertable code type on line 1; Loop start.' and this code '221DB8C8 00000001'. |
Author: | Dualscreenman [ Wed Jan 17, 2007 5:38 pm ] |
Post subject: | |
2) AR -> CB converting is unimplemented as of now. |
Author: | dlong [ Wed Jan 17, 2007 5:43 pm ] |
Post subject: | |
Dualscreenman wrote: 2) AR -> CB converting is unimplemented as of now. Lies. DragonCheat wrote: I'm confused:? and have 2 problems.
When I use ndsconvert 1.0 to convert this Codebreaker code I came up with for Digimon World DS, that I can't use on the Codebreaker because I can't find a working Mastercode, 421db8c8 00280180 00000001 00000000 to an Action Replay code, C0000000 00000028 D3000000 00000000 D2000000 00000000 021DB8C8 00000001 D4000000 00000600 D0000000 00000000 One; the converted code doesn't work right on the Action Replay, it only affects the first digimon instead of all digimon. Two; when I copied and pasted the resulting AR code into the conversion box, after clearing the old codes out and switching to 'AR to CB' mode, to see what would happen going the other way I get this error 'Unconvertable code type on line 1; Loop start.' and this code '221DB8C8 00000001'. Apparently I didn't implement the slide code correctly. I'll PM kenobi. From the documentation, it sounded like it would work though. In the mean time, try this: Code: 221DB8C8 00000001 221DBEC8 00000001 221DC4C8 00000001 221DCAC8 00000001 221DD0C8 00000001 221DD6C8 00000001 221DDCC8 00000001 221DE2C8 00000001 221DE8C8 00000001 221DEEC8 00000001 221DF4C8 00000001 221DFAC8 00000001 221E00C8 00000001 221E06C8 00000001 221E0CC8 00000001 221E12C8 00000001 221E18C8 00000001 221E1EC8 00000001 221E24C8 00000001 221E2AC8 00000001 221E30C8 00000001 221E36C8 00000001 221E3CC8 00000001 221E42C8 00000001 221E48C8 00000001 221E4EC8 00000001 221E54C8 00000001 221E5AC8 00000001 221E60C8 00000001 221E66C8 00000001 221E6CC8 00000001 221E72C8 00000001 221E78C8 00000001 221E7EC8 00000001 221E84C8 00000001 221E8AC8 00000001 221E90C8 00000001 221E96C8 00000001 221E9CC8 00000001 221EA2C8 00000001 For converting back, it's just too difficult to tell what's going on to be able to accurately convert codes like that. Don't count on ever being able to convert the C or D codes to CB via my app. EDIT: I may have found the problem on my own. Try this: Code: C0000000 00000028
D3000000 00000000 D2000000 00000000 021DB8C8 00000001 DC000000 00000600 D0000000 00000000 The only change is the second digit of the next-to-last line is now 'C' |
Page 1 of 6 | All times are UTC - 8 hours [ DST ] |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |