Post by spannernick on Jun 30, 2020 17:06:48 GMT
I just found out the64 file Carousel was meant to show 255 games but it only shows about 226 games so I was wondering if anyone is willing to try a hack it to get it to display 300 games, PCU needs it. Looking ast the HxD at the53=4 file for the maxi at DD44 it does has FF so why is in not showing 255 games, only 226..? whats the next hex number..?
You can do it with HxD - Freeware Hex Editor and Disk Editor
I posted this here so it has its own post about it if you want more game in the Carousel.
This is for theC64 Mini, the64 file... So if Change the 0x96 to FF: -> 255 games in the Carousel,what is the code for 300 games, you need to add another 96 bytes then so FF to ?
In the the64 (v1.3.2) elf bin at offset 0xD9D0 you will find the value 0x96 (150).By looking at the code it looks like this is where the init code for the lib happens
:0001D9D0 96 00 A0 E3 MOV R0, #150 <- This byte
:0001D9D4 09 7D 00 EB BL malloc_game_lib
If anyone would like to try to get more games then set this byte to like 0xC8 (200) and see if you can have more games.
(this is the the64 file that is 238884 in size. I think it is for the US mini version?)
(for the file with size 260240 (maxi?) it is the offset 0xDD44)This reminds me of the good old days, scanning memory on the C64 for special values. Where's PEEK and POKE for Linux?
In the 'the64' source there's in gamelibrary.h:
So if i understand correctly the struct's memory is reserved based on the compile-time constant GAME_META_TITLE_MAX (note this is from v1.2.0, since then increased to 150). Or is this memory only reserved at run-time?
Edit:
Amazingly enough this seems to work! I tried it on the Mini.
So great idea raxrip ! This patch would be a nice addition to your Carousel editor.
Oh and GAME_META_TITLE_MAX 100 is the Title of the game, the name of it and how big the its name can be, 100=100 characters long, it the wrong place in the code for the game slots...
You can do it with HxD - Freeware Hex Editor and Disk Editor
I posted this here so it has its own post about it if you want more game in the Carousel.
This is for theC64 Mini, the64 file... So if Change the 0x96 to FF: -> 255 games in the Carousel,what is the code for 300 games, you need to add another 96 bytes then so FF to ?
Feb 10, 2020 17:43:07 GMT jj0 said:
About the max limit of 150 games in the carousel.
In the the64 (v1.3.2) elf bin at offset 0xD9D0 you will find the value 0x96 (150).By looking at the code it looks like this is where the init code for the lib happens
:0001D9D0 96 00 A0 E3 MOV R0, #150 <- This byte
:0001D9D4 09 7D 00 EB BL malloc_game_lib
If anyone would like to try to get more games then set this byte to like 0xC8 (200) and see if you can have more games.
(this is the the64 file that is 238884 in size. I think it is for the US mini version?)
(for the file with size 260240 (maxi?) it is the offset 0xDD44)
In the 'the64' source there's in gamelibrary.h:
#define GAME_META_TITLE_MAX 100
.
.
.
.
typedef struct {
unsigned char title [GAME_META_TITLE_MAX + 1];
char filename [GAME_META_FILE_MAX + 1]; // room for path too
unsigned char description[LANG_MAX][GAME_META_DESCRIPTION_MAX + 1];
unsigned char author [MAX_AUTHOR][GAME_META_AUTHOR_MAX + 1];
unsigned char publisher [GAME_META_PUBLISHER_MAX + 1];
unsigned char music [GAME_META_MUSIC_MAX + 1];
unsigned char genre [GAME_META_GENRE_MAX + 1];
unsigned char year [GAME_META_YEAR_MAX + 1];
char cover_img [GAME_META_FILE_MAX + 1];
char screen_img [MAX_SCREEN_IMAGES][GAME_META_FILE_MAX + 1];
int author_count;
int screen_image_count;
int cartridge_title_id;
int needs_truedrive;
int needs_driveicon;
int vertical_shift; // Screen has top/bottom boarders chopped. This allows adjust.
int is_ntsc;
int is_64;
int is_basic;
sid_type_t sid_model;
joystick_map_t port_map [JOY_MAX_PORT][JE_MAX_MAP];
int port_primary;
unsigned int duration;
} game_t;
So if i understand correctly the struct's memory is reserved based on the compile-time constant GAME_META_TITLE_MAX (note this is from v1.2.0, since then increased to 150). Or is this memory only reserved at run-time?
Edit:
Amazingly enough this seems to work! I tried it on the Mini.
- Change the 0x96 to 01: -> Segmentation Fault. Bad luck for the people who only want ONE game in the Carousel?
- Change the 0x96 to 95: -> 149 games in the Carousel
- Change the 0x96 to C8: -> 200 games in the Carousel
- Change the 0x96 to FF: -> 255 games in the Carousel
So great idea raxrip ! This patch would be a nice addition to your Carousel editor.