That's awesome, by the end of the week I'll have around 6 games converted. I'm working on it right now. Going to test them with the new .bingameblabla wrote: ↑Sat Aug 31, 2024 6:26 pm Another update : Ghabry helped me track down the performance issues on the 16bpp build and it's a lot better now. It's now the default.
I also added MP3 decoding to the build and it only added like 100kb. I managed to save another 300kb or so by switching to Miniz/spng instead of libpng/zlib + some other changes. This shouldn't impact games for now (there's no transparency for png files using grayscale format for now but i've never seen a game use that).
Of course, you still need to convert all of your MP3 files to 11025hz, it goes without saying. (i may think of dropping the quality down to 8-bits but i'm not sure)
Anyway, i have provided new bins.
Save are still not supported btw, i encounter an issue with EasyRPG that just flat out crashes if i try to force set save_fs...
EasyRPG for Sega Dreamcast (Alpha release)
-
- Heroine Console
- Posts: 475
- Dreamcast Games you play Online: Phantasy Star Online, Quake 3, Monaco Grand Prix, Planet Ring, Alien front online
- Contact:
Re: EasyRPG for Sega Dreamcast (Alpha release)
For tutorials and homebrews access Titan Game Studios: https://titangamestudioscom.wordpress.com/
For interviews and gameplay support me on YouTube:
https://www.youtube.com/@NaiAdventure/featured
For interviews and gameplay support me on YouTube:
https://www.youtube.com/@NaiAdventure/featured
- gameblabla
- lithium
- Posts: 40
Re: EasyRPG for Sega Dreamcast (Alpha release)
Pushed a minor update to Wadanohara build : it's now faster (10 fps gain on average, maybe more so).
I think for now though that this will be the extent of it optimisation wise unless i switch it to PVR api or EasyRPG project improves the blitting code significantly (dropping pixman for instance).
Still no save however! I don't think i'll push another build until this is addressed.
I want to support at least saves to SD card so i don't cringe at people playing a game and never coming back from their playthrough...
I think for now though that this will be the extent of it optimisation wise unless i switch it to PVR api or EasyRPG project improves the blitting code significantly (dropping pixman for instance).
Still no save however! I don't think i'll push another build until this is addressed.
I want to support at least saves to SD card so i don't cringe at people playing a game and never coming back from their playthrough...

-
- Heroine Console
- Posts: 475
- Dreamcast Games you play Online: Phantasy Star Online, Quake 3, Monaco Grand Prix, Planet Ring, Alien front online
- Contact:
Re: EasyRPG for Sega Dreamcast (Alpha release)
Thanks a lot for this! I'm already updating the games here.gameblabla wrote: ↑Mon Sep 02, 2024 3:13 pm Pushed a minor update to Wadanohara build : it's now faster (10 fps gain on average, maybe more so).
I think for now though that this will be the extent of it optimisation wise unless i switch it to PVR api or EasyRPG project improves the blitting code significantly (dropping pixman for instance).
Still no save however! I don't think i'll push another build until this is addressed.
I want to support at least saves to SD card so i don't cringe at people playing a game and never coming back from their playthrough...![]()
I realized using GIMP and image -> mode -> indexed improves a lot the performance as well!
I still will do more tests before uploading the games I converted.
For tutorials and homebrews access Titan Game Studios: https://titangamestudioscom.wordpress.com/
For interviews and gameplay support me on YouTube:
https://www.youtube.com/@NaiAdventure/featured
For interviews and gameplay support me on YouTube:
https://www.youtube.com/@NaiAdventure/featured
-
- Heroine Console
- Posts: 475
- Dreamcast Games you play Online: Phantasy Star Online, Quake 3, Monaco Grand Prix, Planet Ring, Alien front online
- Contact:
Re: EasyRPG for Sega Dreamcast (Alpha release)
I'm currently working on a game that only runs properly with 32MB of RAM enabled on Flycast. I'm curious, did you enable the 32MB option in the code? I have a few other questions just to be sure everything is set up correctly.gameblabla wrote: ↑Mon Sep 02, 2024 3:13 pm Pushed a minor update to Wadanohara build : it's now faster (10 fps gain on average, maybe more so).
I think for now though that this will be the extent of it optimisation wise unless i switch it to PVR api or EasyRPG project improves the blitting code significantly (dropping pixman for instance).
Still no save however! I don't think i'll push another build until this is addressed.
I want to support at least saves to SD card so i don't cringe at people playing a game and never coming back from their playthrough...![]()
I know that KOS comes with several modules enabled by default, like keyboard, camera, modem, etc. Did you disable these? It could help free up some RAM.
How does the loading process work? Is the Dreamcast loading all assets at once? (I can't remember if RPG Maker handles things this way.)
Lastly, I'm not sure if you're aware of this library: https://github.com/TItanGuy99/Sh4-Tricks
It might help improve performance.
I’ve managed to convert 5 games so far, but this one only works with 32MB, lol!
For tutorials and homebrews access Titan Game Studios: https://titangamestudioscom.wordpress.com/
For interviews and gameplay support me on YouTube:
https://www.youtube.com/@NaiAdventure/featured
For interviews and gameplay support me on YouTube:
https://www.youtube.com/@NaiAdventure/featured
- gameblabla
- lithium
- Posts: 40
Re: EasyRPG for Sega Dreamcast (Alpha release)
Since KOS 2022 or so, it's now managed automatically on the fly. This easyrpg will work on both and take advantage of 32MB as well (as you noticed already).
I've already merged other WIP patches that reduces RAM consumption. It helps but not by much.I know that KOS comes with several modules enabled by default, like keyboard, camera, modem, etc. Did you disable these? It could help free up some RAM.
The main problem is that the VRAM sits unused and EasyRPG relies on pixman for allocating its surfaces (which itself takes a big portion of code size and RAM). It's a bit of a pain in the arse right now.
Pixman is POS and slow, it would be better if EasyRPG refactored the whole rendering code so i could just easily plug either OpenGL or even the PVR api to this. In effect, without VRAM usage, it's like losing 7.5mb of free RAM.
If you looked at my branch on github, you may have noticed i already used fast SH4 math, this is what actually helped address some of the performance issues i had with EasyRPG. Unfortunately, sh4 math is mostly floating point only and EasyRPG mostly uses integers.Lastly, I'm not sure if you're aware of this library: https://github.com/TItanGuy99/Sh4-Tricks
It did help me some but the opts i did for now were really the extent of it and besides, the bottleneck is pixman.
It depends on the game. One big bottleneck some games have is the huge database they have. For this, even with PVR api, there is no way around it.How does the loading process work? Is the Dreamcast loading all assets at once? (I can't remember if RPG Maker handles things this way.)
Actually, the only way around it would be to swap directly from FILE. But the EasyRPG talked about this and it went nowhere.
So as of now, forget about running games that require more than 24~32MB on your PC. (you can get a rough estimate of what works and will not work with task manager and the PC version of EasyRPG)
-
- Heroine Console
- Posts: 475
- Dreamcast Games you play Online: Phantasy Star Online, Quake 3, Monaco Grand Prix, Planet Ring, Alien front online
- Contact:
Re: EasyRPG for Sega Dreamcast (Alpha release)
Thanks for the clarificationgameblabla wrote: ↑Tue Sep 03, 2024 5:59 pmSince KOS 2022 or so, it's now managed automatically on the fly. This easyrpg will work on both and take advantage of 32MB as well (as you noticed already).
I've already merged other WIP patches that reduces RAM consumption. It helps but not by much.I know that KOS comes with several modules enabled by default, like keyboard, camera, modem, etc. Did you disable these? It could help free up some RAM.
The main problem is that the VRAM sits unused and EasyRPG relies on pixman for allocating its surfaces (which itself takes a big portion of code size and RAM). It's a bit of a pain in the arse right now.
Pixman is POS and slow, it would be better if EasyRPG refactored the whole rendering code so i could just easily plug either OpenGL or even the PVR api to this. In effect, without VRAM usage, it's like losing 7.5mb of free RAM.
If you looked at my branch on github, you may have noticed i already used fast SH4 math, this is what actually helped address some of the performance issues i had with EasyRPG. Unfortunately, sh4 math is mostly floating point only and EasyRPG mostly uses integers.Lastly, I'm not sure if you're aware of this library: https://github.com/TItanGuy99/Sh4-Tricks
It did help me some but the opts i did for now were really the extent of it and besides, the bottleneck is pixman.
It depends on the game. One big bottleneck some games have is the huge database they have. For this, even with PVR api, there is no way around it.How does the loading process work? Is the Dreamcast loading all assets at once? (I can't remember if RPG Maker handles things this way.)
Actually, the only way around it would be to swap directly from FILE. But the EasyRPG talked about this and it went nowhere.
So as of now, forget about running games that require more than 24~32MB on your PC. (you can get a rough estimate of what works and will not work with task manager and the PC version of EasyRPG)

Let me know if you need any testing, I have GDEMU/DreamShell.
I'm getting more optimization by running the images on tiny PNG. I hope by tomorrow I have everything ready.
For tutorials and homebrews access Titan Game Studios: https://titangamestudioscom.wordpress.com/
For interviews and gameplay support me on YouTube:
https://www.youtube.com/@NaiAdventure/featured
For interviews and gameplay support me on YouTube:
https://www.youtube.com/@NaiAdventure/featured
-
- Heroine Console
- Posts: 475
- Dreamcast Games you play Online: Phantasy Star Online, Quake 3, Monaco Grand Prix, Planet Ring, Alien front online
- Contact:
Re: EasyRPG for Sega Dreamcast (Alpha release)
6 Games Converted for Dreamcast (W.I.P)
I’m excited to share 6 games converted for the Dreamcast: Shenmue The Boat, Grimm's Hollow, Ara Fell, Taut, Standstill Girl, and Beloved Rapture. These projects are still in development and may freeze randomly, but I wanted to give you a chance to test them out and follow their progress.
A huge thanks to my friend Alex from the Estação Ficção channel for creating the fantastic cover art, and to gameblabla for the Easy RPG port.
Note: Ara Fell requires a 32MB Dreamcast.
link: https://drive.google.com/file/d/1FYE2OU ... sp=sharing
For tutorials and homebrews access Titan Game Studios: https://titangamestudioscom.wordpress.com/
For interviews and gameplay support me on YouTube:
https://www.youtube.com/@NaiAdventure/featured
For interviews and gameplay support me on YouTube:
https://www.youtube.com/@NaiAdventure/featured
-
- Heroine Console
- Posts: 475
- Dreamcast Games you play Online: Phantasy Star Online, Quake 3, Monaco Grand Prix, Planet Ring, Alien front online
- Contact:
Re: EasyRPG for Sega Dreamcast (Alpha release)
gameblabla, any chance to implement reading a xpm to have the VMU Icon?
So if I want a VMU Icon, I just need to put a file.xpm in the root folder.
Here is the code vmu.cpp:
Here is the vmu.h
So if I want a VMU Icon, I just need to put a file.xpm in the root folder.
Here is the code vmu.cpp:
Code: Select all
/* Only this XPM will work with this code.. it's too cheap to actually
do any parsing =) */
#include "vmu/graphic.xpm"
#include "vmu/graphic2.xpm"
///Main class for the VMU
vmu::vmu() {
addr = maple_enum_type(0, MAPLE_FUNC_LCD);
vmu::draw(1);
letSaving = false;
if (hasMemoryCard()) {
letSaving = true;
}
}
/* LCD Test: this will do a grayscale seperation into several "frames" and
flip through them quickly to give the illusion of grayscale on the LCD
display. */
uint8 lcd_disp[8][48 * 32 / 8];
void vmu::lcd_gs_pixel(int x, int y, int amt) {
int i;
for (i = 0; i < amt; i++)
lcd_disp[i][(y * 48 + x) / 8] |= 0x80 >> (x & 7);
}
///////Function to display in the VMU screen
void vmu::lcd_gs_setup(char ** xpm) {
int x, y;
memset(lcd_disp, 0, sizeof(lcd_disp));
for (y = 0; y < 32; y++) {
for (x = 0; x < 48; x++) {
int pixel = xpm[31 - y][47 - x];
switch (pixel) {
case '%':
lcd_gs_pixel(x, y, 7);
break;
}
}
}
}
void vmu::draw(int current_screen) {
int frame = 0;
switch (current_screen) {
case 1:
lcd_gs_setup(graphic_xpm + 12);
break;
case 2:
lcd_gs_setup(graphic_xpm2 + 12);
break;
case 3:
//lcd_gs_setup(graphic_xpm3 + 12);
break;
case 4:
//lcd_gs_setup(graphic_xpm4 + 12);
break;
case 5:
//lcd_gs_setup(graphic_xpm5 + 12);
break;
}
if (addr) {
int rv = vmu_draw_lcd(addr, lcd_disp + frame);
if (rv < 0)
printf("got error %d\n", rv);
else {
frame = 0;
}
}
}
bool vmu::hasMemoryCard() {
if (maple_enum_type_ex(0, MAPLE_FUNC_MEMCARD, 0x00020000)) {
return true;
} else {
return false;
}
}
void vmu::setcanSave(bool l) {
if (hasMemoryCard()) {
letSaving = l;
} else {
letSaving = false;
}
}
bool vmu::getcanSave() {
if (hasMemoryCard()) {
return letSaving;
} else {
return false;
}
}
int vmu::DC_SaveToVMU(char * score) {
if (hasMemoryCard() && letSaving) {
fs_rmdir("/ram/yourfile.dat");
file_t myfile;
myfile = fs_open("/ram/yourfile.dat", O_RDWR);
fs_write(myfile, score, strlen(score) + 1);
fs_close(myfile);
vmu_pkg_t pkg;
uint8 * pkg_out;
int pkg_size;
file_t ft;
// Temporal for reading the file
file_t file;
int data_size;
unsigned long zipsize = 0;
uint8 * datasave;
uint8 * zipdata;
// Open file and copy to buffer
file = fs_open("/ram/yourfile.dat", O_RDONLY);
data_size = fs_total(file);
datasave = (uint8 * ) malloc(data_size + 1);
fs_read(file, datasave, data_size);
fs_close(file);
// Allocate some memory for compression
zipsize = data_size * 2;
zipdata = (uint8 * ) malloc(zipsize);
// The compressed save
compress(zipdata, & zipsize, datasave, data_size);
// Make the package to the VMU.
strcpy(pkg.desc_short, "metalcanary");
strcpy(pkg.desc_long, "Metal Canary");
strcpy(pkg.app_id, "metalcanary");
pkg.icon_cnt = 1;
memcpy((void * ) & pkg.icon_pal[0], icon_data, 32);
pkg.icon_data = icon_data;
pkg.icon_anim_speed = 0;
pkg.eyecatch_type = VMUPKG_EC_NONE;
pkg.data_len = zipsize;
pkg.data = zipdata;
vmu_pkg_build( & pkg, & pkg_out, & pkg_size);
// Write at A1 port
fs_unlink("/vmu/a1/metalcanary");
ft = fs_open("/vmu/a1/metalcanary", O_RDWR);
if (!ft) {
return -1;
}
fs_write(ft, pkg_out, pkg_size);
fs_close(ft);
// Free unused memory
free(pkg_out);
free(datasave);
free(zipdata);
return 0;
} else {
return -1;
}
}
int vmu::DC_LoadFromVMU() {
if (hasMemoryCard()) {
char * dst = "metalcanary";
char src[32];
int file;
int filesize;
unsigned long unzipsize;
uint8 * data;
uint8 * unzipdata;
vmu_pkg_t pkg;
// Our VMU + full save name
strcpy(src, "/vmu/a1/");
strcat(src, dst);
// Remove VMU header
file = fs_open(src, O_RDONLY);
if (file <= 0) return -1;
filesize = fs_total(file);
if (filesize <= 0) return -1;
data = (uint8 * ) malloc(filesize);
fs_read(file, data, filesize);
vmu_pkg_parse(data, & pkg);
fs_close(file);
// Allocate memory for the uncompressed data
unzipdata = (uint8 * ) malloc(524288); //512KB
unzipsize = 524288;
uncompress(unzipdata, & unzipsize, (uint8 * ) pkg.data, pkg.data_len);
// Save buffer into a RAM file
file_t fd2;
if ((fd2 = fs_open("/ram/yourfile.dat", O_RDWR)) == -1) {
return -1;
}
fs_write(fd2, unzipdata, unzipsize);
fs_close(fd2);
// Free unused memory
free(unzipdata);
return 0;
} else {
return -1;
}
}
Code: Select all
#include <kos.h>
#include <zlib/zlib.h>
#ifndef VMU_H
#define VMU_H
class vmu {
maple_device_t * addr;
bool letSaving;
public:
const unsigned char icon_data[544] = {
0x00,
0xF0,
0x0F,
0x0F,
0x69,
0xF6,
0xCC,
0xFC,
0x88,
0xF3,
0xFC,
0xFF,
0xFC,
0xFF,
0x99,
0xF9,
0x77,
0xF7,
0x44,
0xF4,
0x21,
0xF2,
0xA0,
0xFF,
0x61,
0xF9,
0x93,
0xFC,
0xCB,
0xFC,
0x00,
0xF0,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x00,
0x00,
0x66,
0x66,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x66,
0x66,
0x00,
0x44,
0x00,
0x66,
0x00,
0x44,
0x00,
0x44,
0x44,
0x44,
0x44,
0x44,
0x44,
0x44,
0x00,
0x66,
0x00,
0x44,
0x44,
0x00,
0x00,
0x44,
0x44,
0x00,
0x44,
0x44,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x44,
0x44,
0x44,
0x00,
0x44,
0x44,
0x44,
0x00,
0x44,
0x44,
0x00,
0x66,
0x66,
0x66,
0x66,
0x00,
0x33,
0x22,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x00,
0x33,
0x33,
0x00,
0x66,
0x66,
0x66,
0x00,
0x77,
0x77,
0x00,
0x77,
0x77,
0x77,
0x00,
0x77,
0x77,
0x00,
0x77,
0x77,
0x00,
0x66,
0x66,
0x00,
0x77,
0x77,
0x00,
0x00,
0x77,
0x77,
0x00,
0x00,
0x77,
0x77,
0x00,
0x77,
0x77,
0x00,
0x66,
0x00,
0x77,
0x77,
0x00,
0x66,
0x00,
0x77,
0x00,
0x66,
0x00,
0x77,
0x77,
0x00,
0x77,
0x77,
0x00,
0x00,
0x77,
0x77,
0x00,
0x66,
0x66,
0x00,
0x00,
0x66,
0x66,
0x00,
0x77,
0x77,
0x00,
0x77,
0x00,
0x00,
0x00,
0x00,
0x00,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x00,
0x00,
0x00,
0x00,
0x00,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66
};
void lcd_gs_pixel(int x, int y, int amt);
void lcd_gs_setup(char ** xpm);
void draw(int current_screen);
bool hasMemoryCard();
bool getcanSave();
void setcanSave(bool s);
int DC_SaveToVMU(char * score);
int DC_LoadFromVMU();
vmu();
};
#endif
For tutorials and homebrews access Titan Game Studios: https://titangamestudioscom.wordpress.com/
For interviews and gameplay support me on YouTube:
https://www.youtube.com/@NaiAdventure/featured
For interviews and gameplay support me on YouTube:
https://www.youtube.com/@NaiAdventure/featured
- gameblabla
- lithium
- Posts: 40
Re: EasyRPG for Sega Dreamcast (Alpha release)
Once i get save support working, i want to try something like that and possibly reading a text file as well to grab the filename from it (and default to easyrpg if not are found).
Unfortunately EasyRPG code does not make this task easy, the filesystem code is a nested OOP mess.
-
- Similar Topics
- Replies
- Views
- Last post
-
- 14 Replies
- 40420 Views
-
Last post by salvo00786
-
- 58 Replies
- 77459 Views
-
Last post by Ian Micheal
-
- 1 Replies
- 4469 Views
-
Last post by kremiso
-
- 4 Replies
- 7113 Views
-
Last post by fafadou
-
- 5 Replies
- 9865 Views
-
Last post by Ro Magnus Larsson