Editor, Expert player (2329)
Joined: 5/15/2007
Posts: 3933
Location: Germany
I'm getting a thread started on this game, although I don't think I will work on it anytime soon. This is basicly a bomberman clone where you have to kill all enemies on the board to advance to the next level. Up to 4 players can play the game. There is a multiplayer mode, a level editor and 3 "level games". In adventure mode, each player can have up to 9 lives at a time. Destroyed blocks will sometimes reveal power-ups/upgrades, which are predetermined at level start (or more precisely: at the time when the block is created). I think it depends on timing so maybe this fact can be abused to get op ugprades at the start of each level (such as flamethrower, go-through-walls, or stone explosion). Manual Final level There are 3 level games: PLAY_STD.BAT
  • xp.lev
  • 113 levels
  • reveals a password after each level
PLAY_ADV.BAT
  • adv.lev
  • 60 levels
  • does not reveal a password after each level
  • consists of levels taken from both xp.lev and pro.lev
PLAY_PRO
  • pro.lev
  • 41 levels
  • does not reveal a password after each level
PRO.LEV passwords: --> level 5 --- 0266 --> level 10 --- 9911 --> level 15 --- 4293 --> level 20 --- 5143 --> level 25 --- 6079 --> level 30 --- 3868 --> level 35 --- 0666 --> level 40 --- 8987 --> level 41 --- 4648
Editor, Expert player (2329)
Joined: 5/15/2007
Posts: 3933
Location: Germany
I'm looking for information on how to search/watch memory addresses. Perhaps I'd be interested in luascripting in JPC-rr, too. Is there anything to look out for in comparison to other emulators? In particular, since I already know items are pre-determined for each block, I'm interested in knowing the items beforehand, without having to break the blocks (which would be unfeasible due to JPC-rr's reduced speed). And I'm interested in anything related to timers/RNG. Some enemies such as the blue gnomes can warp to your bomb, steal it and warp somewhere else at a random timing. I'd like to have this predictable, if possible. Boston Bomb Club is looking difficult to make a good and entertaining run with, so I might work on this (or another game) first. Depending on whether I can figure out the RNG/Item stuff and if I can handle playing 4 players (it's doable with the virtual keyboard but might be very time consuming).
Active player (378)
Joined: 9/25/2011
Posts: 652
The only way to do memory searches/watches is through lua scripting. I’ll try to get the scripts I use shared here tonight if I have time. Figuring out the RNG is nearly impossible without a look into the source code for the game. First you have to find the memory address that holds the current RNG seed, then you have to figure out the calculation for generating the next number, then you have to figure out what that number means for the thing you’re trying to watch/manipulate. Countdown timers are a little easier to find, but still require a lot of digging.
Editor, Expert player (2329)
Joined: 5/15/2007
Posts: 3933
Location: Germany
c-square wrote:
Figuring out the RNG is nearly impossible without a look into the source code for the game. First you have to find the memory address that holds the current RNG seed, then you have to figure out the calculation for generating the next number, then you have to figure out what that number means for the thing you’re trying to watch/manipulate.
Having the seed is (and has been) good enough in many cases. Thanks for your help!
Active player (378)
Joined: 9/25/2011
Posts: 652
MUGG wrote:
Having the seed is (and has been) good enough in many cases. Thanks for your help!
I've posted them on this thread. If you have any tips on how to figure out how something is working just based off the RNG seed, I'd greatly appreciate it. I've found figuring out what the random function's calculation is very difficult in the past.
Editor, Expert player (2329)
Joined: 5/15/2007
Posts: 3933
Location: Germany
Default key config (on my own keyboard)
	UP	DOWN	LEFT	RIGHT	BOMB
Player 1	up	down	left	right	insert
Player 2	w	s	a	d	ctrl
Player 3	p	ö	l	ä	num0
Player 4	z	h	g	j	v
---
0 solid
1 breakable
2 breakable (requires 1 more hit)
3 breakable (requires 2 more hits)
4 breakable (requires 3 more hits)
5 invisible wall
6 skull
7 bomb
8 nothing
9 +bomb
10 +range
11 +speed
12 red ?
13 blue ?
14 green ?
15 white ?
16 switch players
17 stop time
18 shield
19 star
20 web
21 1up
22 poison
I found these out by Cheat Engine. Unfortunately, in Cheat Engine, the address was not shown as green, so it is dynamically assigned? I need to do more testing. --- I put an item in the top right corner of the field and ran searches whilst changing the item, with these two results:
64919,82676
I then added another item to the left of the previous item and ran searches whilst changing that item, and the results were:
64919,82676
The same addresses? I added another tile 2 spots to the left of the top right corner and this time it's
64918,82676
Perhaps we can discard the 2nd result (82676). It turned out my perception of how walls can contain items is wrong. In fact, when a wall is broken, RNG is called to determine the item that will be dropped. --> I broke wall A = +bomb, I died and broke the same wall A again = star --> I broke wall B = +bomb, I broke wall A = star So I will need to look for the RNG seed next. --- I ran searches, looking for the RNG seed and these are the results. I can't seem to narrow it down more. Perhaps it is a dword address?
198442|4
198443|59
198444|237
198445|108
It seems RNG is advanced when there is an explosion graphic on the screen. It is advanced multiple times for each explosion. * Can I display something on the JPC screen? * Can I specify what type is the address that I want to print? (word or byte) * Can I clear the lua output after a loadstate? * When pressing many keys in JPC-rr's virtual keyboard (in order to control 4 players), do these keys all register or is there a key lock like in most physical keyboards?
Editor, Expert player (2329)
Joined: 5/15/2007
Posts: 3933
Location: Germany
Link to video Test video. I think deathless run would be best, so I will restart without putting lives at 9. And I might get flamethrower with the very first explosions instead of the 2nd. This 20 second video was almost 340 MB in size...why?
Reviewer, Expert player (2435)
Joined: 5/21/2013
Posts: 414
Here's the Lua reference I always use: http://repo.or.cz/w/jpcrr.git/blob/refs/heads/r11-maint:/datafiles/luakernel That has all the drawing functions you'll need. If you want to write text on the screen, just remember first to put this line at the start of the script:
dofile("textrender.lua");
EDIT: I guess I should add that the render_text function you'll need isn't in the reference, but you can see it in the textrender file. It works like this:
render_text(flags, x, y, text, singleline, red, green, blue);
Just set flags to 3 and singleline to false.
Editor, Expert player (2329)
Joined: 5/15/2007
Posts: 3933
Location: Germany
Link to video Few seconds faster than the previous video. I'm unhappy I had to wait until the white ? became a flamethrower (? items can have a good or a bad effect depending on timing) and that the left ninja waited... This game really is RNG hell...
DrD2k9
He/Him
Editor, Judge, Expert player (2213)
Joined: 8/21/2016
Posts: 1088
Location: US
MUGG wrote:
Few seconds faster than the previous video. I'm unhappy I had to wait until the white ? became a flamethrower (? items can have a good or a bad effect depending on timing) and that the left ninja waited... This game really is RNG hell...
Try changing your RTC setting to see if you can get the flamethrower faster. Open your movie file in a text editor and change the Initial RTC time. From my experience with some games, it can take a change of at least 1000 to elicit a change in RNG (but that may be game specific). If changing RTC time works, you may be able to get the flamethrower without waiting at all.
Editor, Expert player (2329)
Joined: 5/15/2007
Posts: 3933
Location: Germany
DrD2k9 wrote:
MUGG wrote:
Few seconds faster than the previous video. I'm unhappy I had to wait until the white ? became a flamethrower (? items can have a good or a bad effect depending on timing) and that the left ninja waited... This game really is RNG hell...
Try changing your RTC setting to see if you can get the flamethrower faster. Open your movie file in a text editor and change the Initial RTC time. From my experience with some games, it can take a change of at least 1000 to elicit a change in RNG (but that may be game specific). If changing RTC time works, you may be able to get the flamethrower without waiting at all.
If I understand your suggestion correctly, you want to change the initial time in order to change RNG at the start. This would cause the white ? to fail to appear. Even if it did work, I think it's not much in the face of the 40 levels to come with each level being an RNG hell. Maybe I shouldn't worry too much and just create a run that's not perfect, but just as good as I can manage. Perhaps going 2 players instead of 4 is worth considering, too.
Active player (378)
Joined: 9/25/2011
Posts: 652
MUGG wrote:
I put an item in the top right corner of the field and ran searches whilst changing the item, with these two results:
64919,82676
I then added another item to the left of the previous item and ran searches whilst changing that item, and the results were:
64919,82676
The same addresses? I added another tile 2 spots to the left of the top right corner and this time it's
64918,82676
Perhaps we can discard the 2nd result (82676).
I suggest watching the values of those two addresses as you place items. For the first address, it's possible it stores the contents of two or more spaces in one byte using bitwise operators.
I ran searches, looking for the RNG seed and these are the results. I can't seem to narrow it down more. Perhaps it is a dword address?
198442|4
198443|59
198444|237
198445|108
Usually RNG seeds are word values, whereas it looks like you're outputting byte values there.
* Can I specify what type is the address that I want to print? (word or byte)
Oops. I just realized I uploaded the printmemoryonce.lua with the wrong code (printing letters not values). Here's the updated version. Both printmemory scripts should print the address followed by the byte value and then the word value with either a slash ("/") or pipe ("|") in-between.
* Can I clear the lua output after a loadstate?
If you're talking about manually pressing the "Clear Console" button in the lua window, you can do that whenever you want. I don't think there's a way to automatically do it with lua.
* When pressing many keys in JPC-rr's virtual keyboard (in order to control 4 players), do these keys all register or is there a key lock like in most physical keyboards?
All keys should register, however I haven't tried it on a large number of keys. Note that there is a short amount of time that is spent registering the key presses, which means: a) The order you press keys in might matter. b) It's possible to use up enough time pressing keys that your commands spill into the next frame. Also, there is usually a maximum size to the keyboard buffer (in my experience I think it's something like 19 key presses).
Active player (378)
Joined: 9/25/2011
Posts: 652
MUGG wrote:
I put an item in the top right corner of the field and ran searches whilst changing the item, with these two results:
64919,82676
I then added another item to the left of the previous item and ran searches whilst changing that item, and the results were:
64919,82676
The same addresses? I added another tile 2 spots to the left of the top right corner and this time it's
64918,82676
Perhaps we can discard the 2nd result (82676).
I suggest watching the values of those two addresses as you place items. For the first address, it's possible it stores the contents of two or more spaces in one byte using bitwise operators.
I ran searches, looking for the RNG seed and these are the results. I can't seem to narrow it down more. Perhaps it is a dword address?
198442|4
198443|59
198444|237
198445|108
Usually RNG seeds are word values, whereas it looks like you're outputting byte values there.
* Can I specify what type is the address that I want to print? (word or byte)
Oops. I just realized I uploaded the printmemoryonce.lua with the wrong code (printing letters not values). Here's the updated version. Both printmemory scripts should print the address followed by the byte value and then the word value with either a slash ("/") or pipe ("|") in-between.
* Can I clear the lua output after a loadstate?
If you're talking about manually pressing the "Clear Console" button in the lua window, you can do that whenever you want. I don't think there's a way to automatically do it with lua.
* When pressing many keys in JPC-rr's virtual keyboard (in order to control 4 players), do these keys all register or is there a key lock like in most physical keyboards?
All keys should register, however I haven't tried it on a large number of keys. Note that there is a short amount of time that is spent registering the key presses, which means: a) The order you press keys in might matter. b) It's possible to use up enough time pressing keys that your commands spill into the next frame. Also, there is usually a maximum size to the keyboard buffer (in my experience I think it's something like 19 key presses).
Active player (378)
Joined: 9/25/2011
Posts: 652
MUGG wrote:
I put an item in the top right corner of the field and ran searches whilst changing the item, with these two results:
64919,82676
I then added another item to the left of the previous item and ran searches whilst changing that item, and the results were:
64919,82676
The same addresses? I added another tile 2 spots to the left of the top right corner and this time it's
64918,82676
Perhaps we can discard the 2nd result (82676).
I suggest watching the values of those two addresses as you place items. For the first address, it's possible it stores the contents of two or more spaces in one byte using bitwise operators.
I ran searches, looking for the RNG seed and these are the results. I can't seem to narrow it down more. Perhaps it is a dword address?
198442|4
198443|59
198444|237
198445|108
Usually RNG seeds are word values, whereas it looks like you're outputting byte values there.
* Can I specify what type is the address that I want to print? (word or byte)
Oops. I just realized I uploaded the printmemoryonce.lua with the wrong code (printing letters not values). Here's the updated version. Both printmemory scripts should print the address followed by the byte value and then the word value with either a slash ("/") or pipe ("|") in-between.
* Can I clear the lua output after a loadstate?
If you're talking about manually pressing the "Clear Console" button in the lua window, you can do that whenever you want. I don't think there's a way to automatically do it with lua.
* When pressing many keys in JPC-rr's virtual keyboard (in order to control 4 players), do these keys all register or is there a key lock like in most physical keyboards?
All keys should register, however I haven't tried it on a large number of keys. Note that there is a short amount of time that is spent registering the key presses, which means: a) The order you press keys in might matter. b) It's possible to use up enough time pressing keys that your commands spill into the next frame. Also, there is usually a maximum size to the keyboard buffer (in my experience I think it's something like 19 key presses).