Register | Login | |||||
Main
| Memberlist
| Active users
| ACS
| Commons
| Calendar
| Online users Ranks | FAQ | Color Chart | Photo album | IRC Chat |
| |
Acmlm's Board - I2 Archive - - Posts by beneficii |
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
User | Post | ||
beneficii Lakitu Level: 36 Posts: 121/567 EXP: 299656 For next: 8454 Since: 06-27-04 From: Cordova, TN, USA Since last post: 14 hours Last activity: 6 hours |
| ||
Originally posted by bleempan |
|||
beneficii Lakitu Level: 36 Posts: 122/567 EXP: 299656 For next: 8454 Since: 06-27-04 From: Cordova, TN, USA Since last post: 14 hours Last activity: 6 hours |
| ||
bleempan, GIF in an SF/SNES game? And what is this L0? |
|||
beneficii Lakitu Level: 36 Posts: 123/567 EXP: 299656 For next: 8454 Since: 06-27-04 From: Cordova, TN, USA Since last post: 14 hours Last activity: 6 hours |
| ||
NOTE: All numbers herein in hexadecimal unless otherwise mentioned! As most of you know, Discombobulator lets you change the starting y position of Mario in a world. There is a table starting at 3C39A that carries the y position of starting Mario + 2 in the first nibble. But as you may have noticed, there seems to be no way of changing the x position, or is there? http://www.freewebs.com/beneficii/strtasm3.ips The starting x position for all worlds is hardcoded to 16258. The value there is 20, and it's part of the code. It's part of the instruction LDA #$20. How to deal with this, you ask? Well, I already did, by making an ASM hack, which works. Now (after patching, of course,) there is a table of starting x positions starting at 17C88 and starts at World 1, ending at World 8. This patch should be safe to put onto any ROM, even a hacked one, unless you did a lot of hacking around that area yourself. The value for each of the items in the table is preset to 20, but all you have to do is open up a hex editor and edit them yourself. Note that I've not been able to change the screen number yet, so bare with me there. I know where to store it, but I need to make sure that the world map starts in that screen instead of the first. I have some ideas for finding this out already, but it'll be a day or so, as I have other things to work on for other projects, especially for one that I've unfortunately taken a week off. But I digress. ------------------------------------------------------------------------------------------- EDIT: An even better version can now be downloaded below: EDIT http://www.freewebs.com/beneficii/asmstart.ips Here's how to use it. Remember, these are tables, which have 8 bytes, each corresponding to a world, starting with World 1. 3C39A: Starting y position on the world map. yyyy 0000 y = y position in Discombobulator or Workshop + 2 17C88: Starting x position and screen number on the world map. xxxx ssss x = x position s = screen number 17CAA: Starting position of horizontal scroll xxxx x000 x = each scroll of the world What I mean by scroll is when you go way to the right, it scrolls over a certain value. Your first scroll comes when you reach the x position of E0, followed by a scroll every 80 afterwards. You start with the least significant x in the byte (leave the zeroes as zeros), which would make it 8. This'll be followed by 10, 18, 20, 28, 30, etc. Each succession of numbers counts as a scroll, with 0 meaning that you are on the very left edge of the map. I hope this has been helpful, and I'd really like to hear some feedback! Remember, this patch is safe to attach to any file, as it doesn't really affect the performance of the game, but simply gives you more options. I hope y'all enjoy! EDIT 2: Fixed some errors in the post. EDIT 3: Another fix-up. (edited by beneficii on 06-11-05 10:19 PM) (edited by beneficii on 06-11-05 10:20 PM) (edited by beneficii on 06-11-05 10:21 PM) |
|||
beneficii Lakitu Level: 36 Posts: 124/567 EXP: 299656 For next: 8454 Since: 06-27-04 From: Cordova, TN, USA Since last post: 14 hours Last activity: 6 hours |
| ||
I don't know why, but I always liked Lufia I better than Lufia II. I think the music in Lufia I is livelier and cuter, I like the atmosphere in Lufia I better, and Lufia I actually has Lufia in it. BTW, in Japan the games are called "Estpolis," though I think "Estopolis" would have been a better way to write it. What does that name mean anyway? "-polis" I think means city. Originally posted by KefkaOriginally posted by Scatterheart |
|||
beneficii Lakitu Level: 36 Posts: 125/567 EXP: 299656 For next: 8454 Since: 06-27-04 From: Cordova, TN, USA Since last post: 14 hours Last activity: 6 hours |
| ||
Originally posted by XeYaTan Well, you gotta think about why the circle's there in the first place. It is added to hiragana and katakana that start with an h or an f and it converts the h/f sound to a p sound. My guess, from the little I know about this, is that there is some sort of special flag somewhere that indicates a letter's gonna have either the circle or the " (which makes a consonant voiced) above it. I imagine that if you look hard enough, you'll find a way to "blank" it out, simply not have it put there. EDIT: If it looks like it uses a different code every time, be sure! You don't want to give yourself more trouble than you have to! (edited by beneficii on 06-11-05 11:16 PM) |
|||
beneficii Lakitu Level: 36 Posts: 126/567 EXP: 299656 For next: 8454 Since: 06-27-04 From: Cordova, TN, USA Since last post: 14 hours Last activity: 6 hours |
| ||
Originally posted by geterkikzkid Sure you can. Go here: http://board.acmlm.org/thread.php?id=12906 |
|||
beneficii Lakitu Level: 36 Posts: 127/567 EXP: 299656 For next: 8454 Since: 06-27-04 From: Cordova, TN, USA Since last post: 14 hours Last activity: 6 hours |
| ||
Kamek77, Thanks! I'll let y'all in on a little something. I'm researching how I would make my own World Map Editor for SMB3. I have another project I must do, and I haven't even started coding. I know C++ and I know WinAPI, but I'm just now learning how to work with Device Contexts and Bitmaps. Once I finish this other thing tonight (and I'll be working on related things to that for the next couple weeks), I'll start coding and implementing. It may or may not get finished, but count on it being finished if Acmlm or Hukka don't spruce up their World Map editors. |
|||
beneficii Lakitu Level: 36 Posts: 128/567 EXP: 299656 For next: 8454 Since: 06-27-04 From: Cordova, TN, USA Since last post: 14 hours Last activity: 6 hours |
| ||
Kamek77, These were things I missed. Thanks for getting the info on that! Here's what I recommend you do first to find it out: Go to the start of a table and go ahead 80 bytes. See if anything meaningful appears (i.e. check to see if the exit point matches the exit point in each of the table data). See if they link up. If they don't, then I recommend getting something like FCEUXD, running a trace on the point right where you enter the pipe that takes you to the sky. Right when you enter the pipe. Start the trace right when you have Mario jump up to it, then stop the trace after he starts moving in. Make sure the trace saves to something like a text file. Open up the text file, which will be very large BTW, press Ctrl + F (or however you access your Find function), enter the address of the y position of the pipe sprite, and search for it. If you don't find it, then trace another part of Mario entering the pipe. Basically, search for the part of the ASM that loads the sprite's y position and does something with it. Look to see if it uses the y position value to read any other addresses on the ROM. Open up Discombobulator or Workshop and get the x and y values of the pipe you come out of on the World Map. Check around that same part of the ASM, see if anything matching those x and y and screen values (in the same pattern as the other pipe data) of the pipe gets stored. Then check where those values were loaded from. After finding them, experiment a bit with them, see if you can get a change. If there is and it makes sense, then you will have found your addresses! That's what I would do, anyway, if I had the time right now, but I must work on another project at the moment. EDIT: Never mind. I figured it out. It loads from the very first item in each table, but then swtiches the two positions (i.e. the functions of the left and right nibbles in each item are switched). Well, y'all thought it was unused, but it wasn't. So there. :p (edited by beneficii on 06-12-05 02:35 PM) (edited by beneficii on 06-13-05 05:14 PM) |
|||
beneficii Lakitu Level: 36 Posts: 129/567 EXP: 299656 For next: 8454 Since: 06-27-04 From: Cordova, TN, USA Since last post: 14 hours Last activity: 6 hours |
| ||
In a C Program, I saw a piece of code like this: typedef struct { int num_ptrs; int offset; } MAPSCREEN_POINTER_LOCS; MAPSCREEN_POINTER_LOCS pointer_tables[9] = { {21, 0x19438}, // World 1 map pointers {47, 0x194BA}, // World 2 map pointers {52, 0x195D8}, // World 3 map pointers {34, 0x19714}, // World 4 map pointers {42, 0x197E4}, // World 5 map pointers {57, 0x198E4}, // World 6 map pointers {46, 0x19A3E}, // World 7 map pointers {41, 0x19B56}, // World 8 map pointers {10, 0x19C50}, // Warp Zone pointers (no enemy set / level pointers) }; When the variable pointer_tables was declared as a struct array, each item of the struct could be declared within brackets. This program worked in C. In C++, however, I get errors like "cannot convert from const int to 'MAPSCREEN_POINTER_LOCS'" (and this refers to each of the numbers declared in the struct array. I made the structure like struct MAPSCREEN_POINTER_LOCS { " " " }; but to no avail. I did read that C++ tends to be stricter about this sort of thing than C, but does C++ allow you to declare struct arrays this way, or am I simply doing something wrong? Thanks. |
|||
beneficii Lakitu Level: 36 Posts: 130/567 EXP: 299656 For next: 8454 Since: 06-27-04 From: Cordova, TN, USA Since last post: 14 hours Last activity: 6 hours |
| ||
EDIT: It didn't let me show the include files, probably because of the arrows. Let me try a different way.Originally posted by Ramsus Using MSVC++. I did another test, first with a C program version then with a C++ program version and used MSVC++ to compile it. Here's the source code for the C program, which worked fine (excuse the language btw, it's used to help express my anger at this): #include <stdio.h> void main(void) { struct BITCH { char *punks; const int hos; }; struct BITCH slapya[] = { {"FUCK", 2}, {"YEAH", 3}, {"SHIT", 4}, {"DAMN", 5}, }; printf("Fuck you!\n", ""); } Then I made it into C++, which was: #include <iostream> void main(void) { struct BITCH { char *punks; const int hos; }; BITCH slapya[] = { {"FUCK", 2}, {"YEAH", 3}, {"SHIT", 4}, {"DAMN", 5}, }; cout << "Fuck you!\n"; } It came out with these errors: E:\Program Files\Microsoft Visual C++\MyProjects\win\mainw.cpp(10) : error C2440: 'initializing' : cannot convert from 'char [5]' to 'struct main::BITCH' No constructor could take the source type, or constructor overload resolution was ambiguous E:\Program Files\Microsoft Visual C++\MyProjects\win\mainw.cpp(10) : error C2440: 'initializing' : cannot convert from 'const int' to 'struct main::BITCH' No constructor could take the source type, or constructor overload resolution was ambiguous E:\Program Files\Microsoft Visual C++\MyProjects\win\mainw.cpp(10) : fatal error C1903: unable to recover from previous error(s); stopping compilation Error executing cl.exe. I'm downloading GCC btw. I'm gonna try it out there. Thanks for the tip! (edited by beneficii on 06-14-05 05:21 PM) |
|||
beneficii Lakitu Level: 36 Posts: 131/567 EXP: 299656 For next: 8454 Since: 06-27-04 From: Cordova, TN, USA Since last post: 14 hours Last activity: 6 hours |
| ||
Originally posted by RamsusOriginally posted by sloatOriginally posted by Ramsus What method did he use? I think he deleted it, but I'd be itnerested in hearing about it. |
|||
beneficii Lakitu Level: 36 Posts: 132/567 EXP: 299656 For next: 8454 Since: 06-27-04 From: Cordova, TN, USA Since last post: 14 hours Last activity: 6 hours |
| ||
Ramsus, Yeah, I think that's a good idea, but it costs money. I just download GCC 4. I'm now hoping to put it to use. I also downloaded G++, which I guess allows you to use C++ as well. BTW, I can't seem to find a windows.h file anywhere in the two archives. This allows Windows programming, right? |
|||
beneficii Lakitu Level: 36 Posts: 133/567 EXP: 299656 For next: 8454 Since: 06-27-04 From: Cordova, TN, USA Since last post: 14 hours Last activity: 6 hours |
| ||
I remember this program, DevC++. It doesn't seem as buggy as it used ot be. Thanks for pointing it out again! For one thing, I can declare struct arrays like I want and have it be C++!Originally posted by Ramsus |
|||
beneficii Lakitu Level: 36 Posts: 134/567 EXP: 299656 For next: 8454 Since: 06-27-04 From: Cordova, TN, USA Since last post: 14 hours Last activity: 6 hours |
| ||
Originally posted by neotransotaku It also depends on your compiler, to an extent. That thing I put in the original post can be done in GCC's version of C++, but not in MSVC++'s version of C++. |
|||
beneficii Lakitu Level: 36 Posts: 135/567 EXP: 299656 For next: 8454 Since: 06-27-04 From: Cordova, TN, USA Since last post: 14 hours Last activity: 6 hours |
| ||
This is my first time attemptin the GDI API. I was able to load a bitmap from a resource and display it through this: case WM_PAINT:{ sashi = LoadBitmap(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_BITMAP)); parentdc = BeginPaint(hwnd, &ps); hdc = CreateCompatibleDC(parentdc); gone = (HBITMAP) SelectObject(hdc, sashi); GetObject(sashi, sizeof(bm), &bm); BitBlt(parentdc, 0, 0, 299, 169, hdc, 0, 0, SRCCOPY); SelectObject(hdc, gone); DeleteDC(hdc); EndPaint(hwnd, &ps); break;} //Many variables are elsewhere declared. parentdc and hdc are HDC, gone and sashi are HBITMAP, bm is BITMAP, and ps is PAINTSTRUCT. For all those who think every piece of code I post is wrong (this's directed to you sloat ), this code works as intended. The bitmap in the resource is successfully displayed on the window. This is not the code I have the problem with, but it merely demonstrates what I've been able to do thus far. Now on to the code that gives me a hassle. I created a 24-bit bitmap in memory, whose pixel data is stored in an int array file. The bitmap data is fine, and I've demonstrated that it is fine by writing a function that saves it to a file. When I open up the bitmap in Microsoft Paint, it is perfectly done. Therefore, the pixel data is not the problem. The problem occurs when I try to display the pixel data in a window, therein lies the problem. I've done this piece of code (and several variations), which is based on the older one, but I still can't get it to work. Here: case WM_PAINT:{ HDC hdc, hdcmem; DIBSECTION bm; PAINTSTRUCT ps; hdc = BeginPaint(hwnd, &ps); org = CreateDIBSection(hdc, &bmi, DIB_RGB_COLORS, (void **) &bitmapdata, 0, 0); hdcmem = CreateCompatibleDC(hdc); SelectObject(hdcmem, org); GetObject(org, sizeof(DIBSECTION), &bm); BitBlt(hdc, 50, 50, 16, 16, hdcmem, 0, 0, SRCCOPY); DeleteDC(hdcmem); EndPaint(hwnd, &ps); break;} //Some stuff ain't declared here. HBITMAP org; BITMAPINFO bmi; int bitmapdata[0x300]. The bitmapdata is the pixel data btw. Basically, when I run this, random, ever-changing stuff appears where my bitmap should be. Even if the code is unchanged from the previous execution, usually something different will be drawn anyway. When I loaded my browser to Acmlm and then ran my program, the little hills that are the Acmlm board's icon became my image. As I loaded them again and again they got more messed up. I hope you get what I mean. I did check the Internet for tutorials on displaying DIB's, but none seemed to explain it clearly, in a way I could understand, or in a way I felt fit my situation. Perhaps y'all can explain what exactly does it take to display a DIB on a window. Thanks in advance! EDIT: BTW, the BITMAPINFO was already set up here, in another function: bmpi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); bmpi->bmiHeader.biWidth = 16; bmpi->bmiHeader.biHeight = 16; bmpi->bmiHeader.biPlanes = 1; bmpi->bmiHeader.biBitCount = 24; bmpi->bmiHeader.biCompression = BI_RGB; (edited by beneficii on 06-16-05 09:28 AM) |
|||
beneficii Lakitu Level: 36 Posts: 136/567 EXP: 299656 For next: 8454 Since: 06-27-04 From: Cordova, TN, USA Since last post: 14 hours Last activity: 6 hours |
| ||
Originally posted by sloat I don't think it being read like that is the problem. I did an unsigned char once instead of int, and it still had the same issue; it gave the same kind of screen. I think the problem is that I keep getting bad handles or something. Thanks! I have to leave in a few minutes, and my computer has been on for a while, so I'll have to try this out in a couple hours when I get back. I think simplifying the process of displaying this bitmap as much as I can is a good idea. Thanks. BTW, my HBITMAP gets deleted in the WM_DESTROY case in the WndProc. Thanks a bunch! I'll post or edit a reply when I get back and test it out! |
|||
beneficii Lakitu Level: 36 Posts: 137/567 EXP: 299656 For next: 8454 Since: 06-27-04 From: Cordova, TN, USA Since last post: 14 hours Last activity: 6 hours |
| ||
sloat, Well, I tried the function, but the exact same effect it had: case WM_PAINT:{ PAINTSTRUCT ps; hdc = BeginPaint(hwnd, &ps); SetDIBitsToDevice(hdc, 50, 50, 16, 16, 0, 0, 0, 16, bitmapdata, &bmi, DIB_RGB_COLORS); DeleteDC(hdc); EndPaint(hwnd, &ps); break;} I think I did it right. Do you have any corrections? |
|||
beneficii Lakitu Level: 36 Posts: 138/567 EXP: 299656 For next: 8454 Since: 06-27-04 From: Cordova, TN, USA Since last post: 14 hours Last activity: 6 hours |
| ||
Originally posted by sloat It still doesn't work, even with the bitmap being set to 32-bit and DeleteDC taken out. Here's what I have: case WM_PAINT:{ PAINTSTRUCT ps; hdc = BeginPaint(hwnd, &ps); SetDIBitsToDevice(hdc, 50, 50, 16, 16, 0, 0, 0, 16, bitmapdata, &bmi, 0); EndPaint(hwnd, &ps); break;} BTW, the 32-bitmap displays fine in Paint (I didn't know it could show 32-bit bitmaps, but apparently it can), even when I have a display setting lower than 32-bit color. And even when I have the display setting at 32-bit color, it still doesn't show in the program. An image of what I keep getting is linked below (btw what I keep getting now seems to be constant, which I guess is an improvement). The exported bitmap is also linked. http://www.freewebs.com/beneficii/thetitleofmywindow.png (edited by beneficii on 06-16-05 08:56 PM) (edited by beneficii on 06-16-05 09:17 PM) (edited by beneficii on 06-17-05 03:07 AM) |
|||
beneficii Lakitu Level: 36 Posts: 139/567 EXP: 299656 For next: 8454 Since: 06-27-04 From: Cordova, TN, USA Since last post: 14 hours Last activity: 6 hours |
| ||
Your program crashes my computer, but I saw something you did in your program that I didn't do in mine. I implemented it in mine, and guess what, it works! Success! Success! What I didn't do was arrange the pixel array correctly. So I converted it to an unsigned char from an int, and when I ran it, it worked! Thanks, man! |
|||
beneficii Lakitu Level: 36 Posts: 140/567 EXP: 299656 For next: 8454 Since: 06-27-04 From: Cordova, TN, USA Since last post: 14 hours Last activity: 6 hours |
| ||
This game does look like it has potential. I heard some music was also being composed for the game. Will the new music make it into the final game? |
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
Acmlm's Board - I2 Archive - - Posts by beneficii |