You are not logged in.
Pages: 1
I know that I suck at programming, so I decided just to explain few my ideas with my implementation so that they could be adjusted to fit your style :) They all are windows version-related I think.
1) Savestates should not unpause game if it is paused.
Http://www.everfall.com/paste/id.php?01j8xzshd8o4
2) Storing input in separate variable.
http://www.everfall.com/paste/id.php?nw98atap2jjt
There's one reason behind it - currently if you save state holding right, then release it and load state - button will be held in game. This modification however removes this effect.
3) I don't know how to do it yet, but avi output would be really nice, especially if output was 60 fps movie without skipped frames.
Edited after some IRC discussion.
Last edited by zefiris (2007-04-21 20:15:01)
Offline
I'm quite fond of how to do proper movie recording, as I've implemented it a few times in the past, but I seriously doubt you could get 60fps AND movie recording.
Offline
shash, I mean you should record AVI with emulation speed, but recorded movie should be 60 fps and have every frames, no lags and anything else. PCSX can do it already, you play at 20fps and record movie, but AVI plays at 60 FPS and everything looks like it was running on full speed.
Offline
Just use FRAPS?
Offline
The fastest/easiest way I can think of is to set 0 frame skip and dump a screenshot every frame (a bit of code hacking required). Then use some external program to convert the screens to an avi (or whatever format you want).
This saves a lot of coding and means the slow part (the video encoding) can be done separately with a lot more options for the output format. Have a google to find free software for the conversion.
Offline
Fraps does not do what I want, masscat's method works better Exporting bmps wil take a lot of hard disk space though
Offline
Fraps does not do what I want, masscat's method works better Exporting bmps wil take a lot of hard disk space though
Well... export bmp, convert to jpg or png with imagemagick then create a movie with mencoder?
Offline
I know how to convert moltiple image, but it's no use if I record whole movie to bmps first as they will still take all the place. If there was export to pngs...
Offline
Buy yourself a nice big USB hard drive.
Or, the cheaper solution, implement PNG export. libpng is pretty easy to use for simply dumping RGB data to a PNG file. Here is a section of code that uses it to write out a bitmap image.
FILE *fp;
fp = fopen( filename, "wb");
png_structp png_ptr = png_create_write_struct( PNG_LIBPNG_VER_STRING,
(png_voidp)NULL, NULL, NULL);
if ( png_ptr != NULL) {
png_infop info_ptr = png_create_info_struct( png_ptr);
if ( info_ptr != NULL) {
if ( setjmp( png_jmpbuf( png_ptr)) == 0) {
png_byte **rows_buffer = malloc( total_height * sizeof( png_byte *));
// give the library the file pointer
png_init_io( png_ptr, fp);
// fill in the information
png_set_IHDR( png_ptr, info_ptr, width, total_height, 1,
PNG_COLOR_TYPE_GRAY, PNG_INTERLACE_NONE,
PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
// allocate the row buffer things
if ( rows_buffer != NULL) {
int i, j;
int byte_width = (width + 7) / 8;
int row_index = 0;
for ( j = 0; j < num; j++) {
for ( i = 0; i < heights[j]; i++, row_index++) {
rows_buffer[row_index] = &buffers[j][i * (byte_width)];
}
}
png_set_rows( png_ptr, info_ptr, rows_buffer);
// write the image
png_write_png( png_ptr, info_ptr, PNG_TRANSFORM_IDENTITY, NULL);
free( rows_buffer);
join_good = TRUE;
}
else {
LOG( LOG_ERROR, "Failed to allocate the row pointer buffer");
}
}
else {
LOG( LOG_ERROR, "The libpng calls failed somewhere");
}
png_destroy_info_struct( png_ptr, &info_ptr);
}
else {
LOG( LOG_ERROR, "Failed to allocate the png info structure");
}
png_destroy_write_struct( &png_ptr, (png_infopp)NULL);
}
Offline
yay, thanks
Offline
Pages: 1