Author Topic: [release] alternative ED64 Menu  (Read 21525 times)

0 Members and 1 Guest are viewing this topic.

Offline saturnu

  • Sr. Member
  • ****
  • Posts: 467
  • Karma: +61/-0
    • View Profile
    • :D
[release] alternative ED64 Menu
« on: July 27, 2013, 01:17:06 PM »
Hi,
I have good and bad news for you guys. ^^
The bad one is, i'm going to stop working on that menu, but the good one is... you'll maybe hear from me in conjuction with a new mystical retrogaming project. :D

Young minds, fresh ideas!
If you are interested in improving that menu, feel free to download the source and do whatever you want with it. ^^
Here's a tutorial sanni made if you need some help to get started.


Tutorial + virtual machines
https://github.com/parasyte/alt64
Learn C The Hard Way



Hello everyone,

here is my menu for the ED64, it's based on libdragon, Neo64Menu, ED64IO, nrage-plugin, lib-hkz, libmikmod and some great help of Krikzz. ^^

-no official support on that from krikzz! don't blame him on that :D
use it on your own risk




Download 15 Oct 2014:
ALT64 Version 0.1.8.7-cheat
alt64_font_fix+debug_0187b.zip

Source v0.1.8.6:
https://github.com/parasyte/alt64

Installation hints:
Make sure you have created all neccessary folders by hand
/ED64
/ED64/SDSAVE
/ED64/CFG

For the Mempak default save dir, it's possible to change the name in ALT64.ini
/MEMPAKS


Key settings;
L brings up the mempak menu
      B abort
      A backup
      R format
      Z view controller pak
Z about screen
A start rom/directory/mempak
B back/cancel
START start last rom
C-left rom info / mempak content view
C-right rom config  screen
C-up view full filename
C-down Toplist 15

Configuration comments:
Code: [Select]
[ed64] ; Menu config
This is the so called section.
All keys after the section declaration are associated with that
section, until a new one
is defined.

border_color_1=FFFFFFFF ; 0x00000080 RGBT
border_color_2=3F3F3FFF ; 0x3F3F3FFF RGBT 00000060 w light
The border colors are for the thin line around the boxes.

box_color=000000B6 ; 0x00000080 RGBT
This box color is used for the main filelist. The last byte is the
alpha value (transparency level).

selection_color=80008070 ; 80008070 RGBT 6495ED60
This color is used for the cursor line in the fileliste.

list_font_color=CDC9C940 ; 80008070 RGBT 6495ED60
The filelist font color for normal files.

list_dir_font_color=FFFFE040 ; 80008070 RGBT 6495ED60
The filelist font color for directory entries.

selection_font_color=FFB90FFF ; 80008070 RGBT 6495ED60
The color for the font on to of the cursor line.

text_offset=0 ; shift menu horizontal e.g. -1
This key shifts the screen contet to the left or the right, not only
text, even the boxes.

cd_behaviour=1 ; 0=first entry 1=last entry
You can configure what happens if you leave a directory. The default setting
lets you return with the cursor over the just left directory.

scroll_behaviour=0 ; 0=page-system 1=classic
The scroll behaviour lets you switch between page-wise brwosing and a
pageless filelist.

quick_boot=1 ; 'START' boots last rom
If you disable that key 'START' boots roms like the 'A' button.

sound_on=1 ; sounds 1=on 0=off
If you disable the sound, you might be able to navigate a bit faster.

page_display=1 ; display page - 1=on 0=off
The e.g. '1/4' in front of SD:// on top of the filelist

tv_mode=0 ; 1=ntsc 2=pal 3=mpal 0=force_off
This is the key where you can force the menu to 60Hz if you are on PAL.
It's very useful if you have a RGB modded n64.

enable_colored_list=1 ; 1=enable 0=disalbe
This is the on/off switch for the rating colors in the filelist.
If you have rated a lot of games and have performance issues, try to disable it.

ext_type=0 ; 0=classic 1=OS64
ALT64 classics: e4k,e16,srm,128,fla
 OS64 settings: eep,eep,sra,sra,fla

sd_speed=2 ; 1=25MHz 2=50MHz
50/60Hz SDCard settings just like in the original menu

background_image=background.png ; backgrund png image 320x240 32bit
The name of the wallpaper in '/ED64/WALLPAPER'.

hide_sysfolder=0 ; 1=hide 0=don't hide
With this setting you decide if, you want to hide 'ED64' from the fileliste.

mempak_path=/MEMPAKS/ ; surround with slashes
The default save path for new mempak-backups (when you enter the filename).

save_path=SDSAVE ; save directory inside ED64
If you decide to use your old savegames you could change this to 'SAVE' and
'ext_type' to '1', instead of renaming the files. :>

[user]
name = saturnu        ; Username
Maybe it's useful for further customization, but now it's just a leftover
of a example ini. ^^

[gblite]
save_path=/ED64/SDSAVE/ ; save directory surround with slashes
tv_mode=0 ; 1=ntsc 2=pal 3=mpal 0=force_off
The gblite version auf gnuboy64 uses this two entries.
With the 'tv_mode' key you can force 60Hz like the setting for the menu itself.
[/spoiler]

Working features:
filebrowser
sounds
gameshark cheats (parasyte)
mempak restore
mempak backup - with filename input screen
savetyp detection based on a cart-id list
sd speed 25/50MHz
tv-type force
save force
cic force
boot_region force
crc fix
boxart
can run gameboy games (Colnes gnuboy64 port)
can run nes games (neon64)
can play gamegear roms
can maybe play msx2 roms
mpk file view
controller pak view
toplist of best rated roms
rom rating

eeprom4k
eeprom16k
sram
sram128
flashram


png background loading from the sd card
color settings for the menu
horizontal menu shift
hide sysfolder
« Last Edit: October 14, 2014, 06:58:23 PM by saturnu »

Offline KRIKzz

  • Administrator
  • Hero Member
  • *****
  • Posts: 1872
  • Karma: +239/-1
    • View Profile
Re: [release] alternative ED64 Menu
« Reply #1 on: July 27, 2013, 02:09:39 PM »
awesome!

Offline Troyus

  • Full Member
  • ***
  • Posts: 146
  • Karma: +5/-2
    • View Profile
Re: [release] alternative ED64 Menu
« Reply #2 on: July 28, 2013, 01:29:46 AM »
Great work, I love the idea of mods from teh community.

What the dif with this mod?

Offline Redifer

  • Sr. Member
  • ****
  • Posts: 331
  • Karma: +16/-26
  • DO! BASEBALL!
    • View Profile
    • Game Sack
Re: [release] alternative ED64 Menu
« Reply #3 on: July 28, 2013, 01:41:25 AM »
Yeah, good job, I love that you put effort into this. A feature list of what this alternative menu does would be great.

Offline dvd2vcd

  • Hero Member
  • *****
  • Posts: 1652
  • Karma: +147/-116
    • View Profile
Re: [release] alternative ED64 Menu
« Reply #4 on: July 28, 2013, 12:07:08 PM »
wow nice release! i love it here on the ED forum :)

Offline saturnu

  • Sr. Member
  • ****
  • Posts: 467
  • Karma: +61/-0
    • View Profile
    • :D
Re: [release] alternative ED64 Menu
« Reply #5 on: August 05, 2013, 06:55:54 PM »
Do you guys have an idea why my dump through the pi of the sram region after reset starting at 0xA8000000 offset 0x0
is slightly different of what the ed64 original os writes into its savefiles? ^^

did i miss to initialize something before the pif simulation?
so that the game is missing data and don't know what to write after offset 0x2b?

the right one is my bad sram dump - it's ocarina of time (pal)

http://wiki.spinout182.com/w/Ocarina_of_Time:_Save_Format

greetings saturnu

Offline Chilly Willy

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 485
  • Karma: +31/-3
    • View Profile
Re: [release] alternative ED64 Menu
« Reply #6 on: August 05, 2013, 08:03:33 PM »
Looks like the PI lost sync in places. Did you remember to change the bus controller speed before doing the DMA? Like this

Code: [Select]
    // Init the PI for sram
    vu32 piLatReg = PI_BSD_DOM2_LAT_REG;
    vu32 piPwdReg = PI_BSD_DOM2_PWD_REG;
    vu32 piPgsReg = PI_BSD_DOM2_PGS_REG;
    vu32 piRlsReg = PI_BSD_DOM2_RLS_REG;
    PI_BSD_DOM2_LAT_REG = 0x00000005;
    PI_BSD_DOM2_PWD_REG = 0x0000000C;
    PI_BSD_DOM2_PGS_REG = 0x0000000D;
    PI_BSD_DOM2_RLS_REG = 0x00000002;

    // DMA sram space to buffer
    data_cache_hit_writeback_invalidate(dmaBuf, len);
    while (dma_busy()) ;
    PI_STATUS_REG = 3;
    dma_read((void *)((u32)dmaBuf & 0x1FFFFFF8), 0xA8000000, len);
    data_cache_hit_invalidate(dmaBuf, len);

    PI_BSD_DOM2_LAT_REG = piLatReg;
    PI_BSD_DOM2_PWD_REG = piPwdReg;
    PI_BSD_DOM2_PGS_REG = piPgsReg;
    PI_BSD_DOM2_RLS_REG = piRlsReg;

Offline saturnu

  • Sr. Member
  • ****
  • Posts: 467
  • Karma: +61/-0
    • View Profile
    • :D
Re: [release] alternative ED64 Menu
« Reply #7 on: August 06, 2013, 05:19:11 AM »
Yes i did. :/
I even tried to read in smaller blocks and disable the interrupts during reading, but the results are still the same. ^^

edit:
BTW: src/dma.c changed a bit on 25 feb 2012

 {
     while (dma_busy()) ;
     PI_regs->ram_address = ram_address;
-    PI_regs->pi_address = pi_address;
+    PI_regs->pi_address = (pi_address | 0x10000000) & 0x1FFFFFFF;

     PI_regs->write_length = len-1;
     while (dma_busy()) ;
 }
« Last Edit: August 06, 2013, 11:59:46 AM by saturnu »

Offline Chilly Willy

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 485
  • Karma: +31/-3
    • View Profile
Re: [release] alternative ED64 Menu
« Reply #8 on: August 06, 2013, 07:20:17 PM »
Yes i did. :/
I even tried to read in smaller blocks and disable the interrupts during reading, but the results are still the same. ^^

edit:
BTW: src/dma.c changed a bit on 25 feb 2012

 {
     while (dma_busy()) ;
     PI_regs->ram_address = ram_address;
-    PI_regs->pi_address = pi_address;
+    PI_regs->pi_address = (pi_address | 0x10000000) & 0x1FFFFFFF;

     PI_regs->write_length = len-1;
     while (dma_busy()) ;
 }

Oh yeah!! That's the bug right there! When Sean changed the DMA code, he broke it. I had reports of the save ram on the N64 Myth not working, and that code is the source. I did this to the line in dma.c

Code: [Select]
    PI_regs->pi_address = pi_address; //(pi_address | 0x10000000) & 0x1FFFFFFF;
and everything was fine again. Sean goofed - his change forced all DMAs to work on the cart space exclusively, which is fine for reading the cart, but it doesn't allow reading/writing the alternate cart space which is where the save ram is located. His original code was fine and worked as it should. My guess is he changed it because some homebrew using the lib passed an incorrect address in, and he wanted to make incorrect addresses work despite being wrong.

EDIT: Here's my current libdragon: http://www.mediafire.com/download/pjtg8pc9chj0ebd/libdragon-20121203.7z

It has that change made, has PROPER interlace support (official libdragon doesn't do interlaced mode correctly), direct sound passing (rather than copying buffers), C++ support (with an example), and support for using the RSP (still a work in progress, but I'd really like folks to look it over and see what they think). Also includes another example on using the RSP DMA channel for fast blitting of images.
« Last Edit: August 06, 2013, 07:27:27 PM by Chilly Willy »

Offline saturnu

  • Sr. Member
  • ****
  • Posts: 467
  • Karma: +61/-0
    • View Profile
    • :D
Re: [release] alternative ED64 Menu
« Reply #9 on: August 07, 2013, 02:34:51 AM »
ah that's nice of you, thanks chillywilly. ^^

I already changed my dma.c the same way, but the other features are looking interesting. Fixing my sram problem is like to find a needle in a haystack, it's very frustrating. I think I have to do something else and go back if I have a good idea. ^^
« Last Edit: August 07, 2013, 03:20:00 AM by saturnu »

Offline Chilly Willy

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 485
  • Karma: +31/-3
    • View Profile
Re: [release] alternative ED64 Menu
« Reply #10 on: August 07, 2013, 03:01:50 PM »
Remember to be careful of the caches. Cache issues can make DMAd data turn out wrong. It's why modern CPUs do bus snooping on DMA operations and the like. Old CPUs like the MIPS and SuperH leave all cache issues up to the programmer. It's one of the primary pains in using both SH2s in the 32X.

Offline saturnu

  • Sr. Member
  • ****
  • Posts: 467
  • Karma: +61/-0
    • View Profile
    • :D
Re: [release] alternative ED64 Menu
« Reply #11 on: August 10, 2013, 01:25:20 PM »
My SRAM implementation is working. ^^
I made a SRAM-Testrom that was working and later I double checked it with F-Zero X.

Now I'm almost sure that something must be wrong with the way I start ocaria of time.
The strange thing is, that I just copied the pif_simulation of the neo-myth menu.

I think I have to call the function with the cic the everdrive boots of, for the expansion pak detection and with cic 6105 for oot.
The country code is correctly recognized with the game-header.

Does oot need some special timing like Battle Tanx? :>
- or what else could i do? ^^

I have a pal console and cic-7101

btw. resident evil 2 isn't loading, too...

 hopefully someone has an idea :D
greetings, saturnu

Offline Chilly Willy

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 485
  • Karma: +31/-3
    • View Profile
Re: [release] alternative ED64 Menu
« Reply #12 on: August 10, 2013, 11:25:33 PM »
Battle Tanx is the only one that needs the timing set. The difference may be in the flash hardware - the Myth has the ability to simulate any of the CICs to an extent that allows booting. So the neo_run_psram sets the simulated CIC to what the game expects before calling simulate_pif_boot. It's not a full implementation, so those really nasty games need patching for full operation, but most things don't need the CIC past the boot, like ZOOT.

Offline saturnu

  • Sr. Member
  • ****
  • Posts: 467
  • Karma: +61/-0
    • View Profile
    • :D
Re: [release] alternative ED64 Menu
« Reply #13 on: August 13, 2013, 10:10:08 AM »
new testversion with a minimal version of chillywillys gameshark-engine
a readme.txt is included that explains how to use it

dl: first post

happy cheating, saturnu
« Last Edit: October 26, 2013, 07:54:33 AM by saturnu »

Offline Kerr Avon

  • Hero Member
  • *****
  • Posts: 508
  • Karma: +26/-3
    • View Profile
Re: [release] alternative ED64 Menu
« Reply #14 on: August 13, 2013, 02:30:58 PM »
new testversion with a minimal version of chillywillys gameshark-engine
a readme.txt is included that explains how to use it

alt64_gs_beta.7z

happy cheating, saturnu

Thanks. I'm downloading it just to read through the text file - wish I had the power of teleportation, so I could nip home and get my N64...

Mind you, this is 2013 - we should all have jet packs by now...  :(

 

Map