Experienced Forum User, Published Author, Player
(104)
Joined: 6/7/2006
Posts: 20
Thanks for the answers!
The 32bit position values include 16 bits of subpixel information. So in order to get the position without subpixel precision you would calculate (0xFFF6D0.L + 0xFFDBB0.L) >> 16. Or you could wait until the game added 0xFFF6D0.L and 0xFFDBB0.L, and then read FFDBB8.W (or shift FFDBB8.L >> 16).
Reading what vecna wrote made me realize why the way current emulators work is intended. I hadn't thought about audio mixing or variable vertical-length.
I've changed my lua script so that all values are read at the beginning of v-blank, and everything works nice now. I didn't realize you could link lua functions to certain code areas, that's why I didn't try it earlier. So thanks for helping me a) understand why emulators work the way they do and b) understand how to fix my script so that it works the way it is supposed to :)
Experienced Forum User, Published Author, Player
(104)
Joined: 6/7/2006
Posts: 20
Okay, I will explain my specific problem (I thought this was a more general thing with emulators, thats why I tried to explain it without mentioning the specific game).
The game I tested this with is High Seas Havoc (or Havoc / Captn Lang, depending on the region). It's a basic jump'n'run game.
This is the lua script:
So with the script I can calculate how far the player has effectively traveled along the x-axis. At least if the game has done the calculations on the position in the time that Gens leaves for the frame advance. I added the display of the program counter to see where the game stops after frame advancing. This is what what I get when running in the first level:
(The real vX looks one frame into the future, thats why the values are offset by 1 frame.)
So here it happened twice that the position calculation was not yet done when the cpu was paused: Frame 856 and 862.
I am wondering if there is a reason, why the emulator is not halting at the time it triggers the vertical blank interrupt (if it's enabled).
I guess synchronizing the calculations to the vertical blank period should be extremely common in 8/16 bit games, so this would create more reliable results when reading values from RAM.
Experienced Forum User, Published Author, Player
(104)
Joined: 6/7/2006
Posts: 20
I always assumed that when I frame advance in any emulator, it will pause pretty much when the vertical interrupt routine would be called. This would make sense since a whole frame has been rendered at this point, and likely the calculations for the next frame havent started.
Lately I've been playing around ith BizHawk and Gens and they both seem to show a different behaviour. This can be a problem if you want to read out RAM values that describe a position of a moving object, since at some frames these values have been updated already, while at others they haven't. The problem I'm having is simplified looking like this:
Consider an object moving with the speed of 1:
Frame: X-Value
1 1
2 2
3 2
4 4
5 5
6 5
7 7
This is anoying since I can't really trust the values my LUA script tells me. Even further this made me question for what time period the input is valid? If the input I am giving for one frame is not synced to something like v_int, how can I know that I am not giving input for 2 frames instead of one?
So my questions are:
What is the timing for frame advance concerning the emulation of the main cpu of a console?
Is the same timing used for input given by the user?
I hope I made my problem understandable. I post it here since it seems like that the behaviour is shared among multiple emulators and not bound to one specific emulator.
Experienced Forum User, Published Author, Player
(104)
Joined: 6/7/2006
Posts: 20
Thanks again :)
Ah, seems like I didn't change it. Well this was due to me being a bit confused about the score screen. It turned out to be like this: you have a pretty huge frame-window in which can press start. If you do press start at least once until the end of that window, the scores will apear a bit faster, but the precise timing of the button press does not make any difference. So yeah, it would have been cleaner if I removed the unnecessary button presses ;)
Okay.
I am pretty sure that I am indeed as close as possible.
I am mostly doing high jumps, however I think I tested it a few times and it didn't make a difference.
I know what you mean, and I will test it again (can't do it at the moment), but if my memory serves me correctly, I tried it and the problem was that the first frame at which I was able to jump without hitting the ceiling was already to late in order to be faster than not jumping at all.
Yep, I am waiting for the platform on the right to flip. Will edit the submission soon.
You are actually right I think. I even did that at anouther point in the same level. But due to strange collision boxes the difference in frames is pretty low. I think its about 3 frames.
Experienced Forum User, Published Author, Player
(104)
Joined: 6/7/2006
Posts: 20
Thanks for the feedback :)
I'm not sure I get what you mean. I sometimes run over a gap, land on the edge, and receive some upward push, so that I continue running on the other side of the gap. I checked whether this is slower than jumping and as far as I know it isn't. If you mean something else or there is a special part of the run where you have concerns please tell me.
I mainly use it to reach higher platforms. The problem with using it to advance in the horizontal is that in order for the knockback to push you right you'd have to slow down a lot before touching the enemy, and you have to accelerate from 0 as soon as you hit the ground. Therefore it's only rarely usable. Again, if you see a particular situation where you think this might be of use, feel free to tell me ;)
I think I see what you mean, but I do this on purpose. If I press right when I bump into a wall I gain horizontal momentum. Therefore if I can't advance horizontaly as long as I'm not high enough, I can at least build up horizontal speed, so as soon as I reach the point where I can advance I'm as fast as possible. It doesn't look very smooth, but its fast ;)
Do you mean before each boss? This is unavoidable. as soon as the screen locks at the bossfight, havocs horizontal speed is set to 0.
I hope this didn't sound like I thought my run was perfect or anything. I just wanted to reply on the constructive criticism of yours ;)
Experienced Forum User, Published Author, Player
(104)
Joined: 6/7/2006
Posts: 20
Yes I read that, moved nasm, and it works in debug (although the linker problem remains). I dont know why The assembler cant be found when I select the release target..
Experienced Forum User, Published Author, Player
(104)
Joined: 6/7/2006
Posts: 20
Thanks for your answers, was quite busy for a few weeks, but as I've just got VS2008, I thought I might try compiling gens once more. I was able to figure my way around many problems, however I am stuck now:
Trying to compile debug:
------ Build started: Project: gens, Configuration: Debug Win32 ------
Linking...
LINK : fatal error LNK1104: cannot open file 'release\mem_M68K.obj'
Trying to compile release:
------ Build started: Project: gens, Configuration: Release Win32 ------
Assembling z80.asm
The System can not find the file specified.
Project : error PRJ0019: A tool returned an error code from "Assembling z80.asm"
Experienced Forum User, Published Author, Player
(104)
Joined: 6/7/2006
Posts: 20
I will make this short:
I am using Visual c++ 6.
When I try to compile gens I lack the following files (all needed by pngconf.h):
fp.h
m68881.h
alloc.h
I am new to visual c++ (have been using codeblocks before) so I might have set up something wrong. Any tips what I could try/how to get fp.h?
Experienced Forum User, Published Author, Player
(104)
Joined: 6/7/2006
Posts: 20
I dont know if this will help you, but I found out that if you run at full speed, keep pressing down while stoping will make you start running at full speed if you press in the same direction again (you have to keep down until you continue running). (hope you understood what I mean ;) )
This could be helpful if you have to stop to avoid hitting an enemy.
Experienced Forum User, Published Author, Player
(104)
Joined: 6/7/2006
Posts: 20
The Ottifants is a nice platformer where you play a baby ottifant who has to find his father ;)
I started a testrun and I pretty like it. What makes it imo intresting to TAS is that you have to collect 50% of the gummy bears in each level to open the exit. I thought about changing the settings to hard which changes the percentage from 50% to 75% but that would make finding a good route extremly hard, and the run might get a bit boring.
I found 2 glitches, one in the collision detection which I cant yet abuse, and another one which lets me kill the first boss in much shorter time than you are supposed to. It might be possible to use death as shortcut, since when you die you go back to level begin or the last checkpoint but the collected gummy bears stay.
The testrun isn't perfect although I often tried optimising parts with frame advance.
I am using Ottifants, The (E) [!].
http://rapidshare.de/files/29491192/philipptr_Ottifants_testrunPrev.bak.gmv.html
Btw: In testrun I set the language to english which costs quite some frames (not only one for going down, as it appears to be), and since there is not much text in the game (only menu,levelnames and the end) I wanted to know if you think I could play the final run in german?
Experienced Forum User, Published Author, Player
(104)
Joined: 6/7/2006
Posts: 20
I know that there's a snes run of it, and although it seems that the versions are very much the same I would like to do a run because either LLCoolDave did make quite some mistakes, or the genesis version is different in terms of how many frames a jump takes/how high you get. I found some things which I could do different and faster on the genesis, than they are in his run.
So I wanted to ask if you think I should continue this run, or search for another intresting genesis game.
Experienced Forum User, Published Author, Player
(104)
Joined: 6/7/2006
Posts: 20
It's done.
Well I will post it here since it would get rejected anyway.
Hopefully somebody will watch it and give me some critique on my first speedrun :) http://rapidshare.de/files/24059909/High_Seas_Havoc_-_philipptr.zip.html
---
- Gens 2.11 Movie 9d
- Allow left+right
- Aims for fastest time
- takes damage to save time
- no death
High Seas Havoc (U) [!].bin
Time: 21:49
Experienced Forum User, Published Author, Player
(104)
Joined: 6/7/2006
Posts: 20
yes I know, well I tried to avoid it but didn't make it to get faster than this run.
So I gave the 4. stage a try, but it seems this one is much harder..
Experienced Forum User, Published Author, Player
(104)
Joined: 6/7/2006
Posts: 20
Seems like nobody has the game/is intrested. anyways here's a WIP, maybe someones intrested in giving feedback..
I played until the second boss, (the second boss fight is included but obviously that's not how it's going to stay)
http://rapidshare.de/files/22799216/High_Seas_Havoc_TAS_philipptr_WIP.zip.html
the first levels don't seem to be the most intresting of the game, so let me know if you think that the game is too boring for a TAS..
Experienced Forum User, Published Author, Player
(104)
Joined: 6/7/2006
Posts: 20
I think it was 463 frames faster.
btw: how do you plan on going on with this movie: play it through and then hex all the special stages in, or doing it again?
Experienced Forum User, Published Author, Player
(104)
Joined: 6/7/2006
Posts: 20
:D didnt read the whole thread so I didnt knew about nfq's try ;)
gave it a try and made it some frames faster than you, but its still looking far from optimal (then again this stage is very hard to TAS), maybe I will give it another try tomorrow...
http://rapidshare.de/files/22657466/3rd_emerald_okay_1_.zip.html
(I hope I uploaded the right file O_o)
Experienced Forum User, Published Author, Player
(104)
Joined: 6/7/2006
Posts: 20
I thought about making a TAS on the little known game "High Seas Havoc" for a while now. I picked it because its a game I really enjoy playing and somehow I thought it was good for a first try at speedruns.
So if someone knows the game, do you think its a good choice?
btw: if someone knows any tricks/things about the game that could help me, it would be nice if you would let me know ;)
I already went frame by frame through the intro/menu (didnt change difficult, since expert would take the chance of taking damage for speed and I didnt see any reason in going to the menu just to make the difficult harder but not highest) and recorded the first level. I had recorded the second level + boss too, but it got lost somehow (was loading a wrong savegame while recording I think)