Shop OBEX P1 Docs P2 Docs Learn Events
Console Emulation - Page 46 — Parallax Forums

Console Emulation

1434446484968

Comments

  • RaymanRayman Posts: 14,744

    Think I'm seeing something wrong with Metal Slug...
    Could be something wrong with my new board with 64 MB of PSRAM though, not sure which yet...

    The left side of screen seems to missing some pixels, except for the bottom of screen...

    640 x 480 - 190K
  • That little 8x8 area in the corner is supposed to be there, just a bug in the game itself. It should be on both sides though, which means your picture position is a bit off.

  • RaymanRayman Posts: 14,744

    Ok, interesting. Guess all good then. Other side is probably issue with the VGA to HDMI adapter.

  • There's yet another new branch in town, called slot-interleave: https://github.com/IRQsome/NeoYume/tree/slot-interleave

    This has a new optimization to speed up sprite ROM access (and by proxy, program ROM access, too). Still need to test this on all configurations, so it's not on master yet. It does have all the usbnew stuff in it though.

    Since I shuffled around the instructions in the problematic area, this might work with @pik33 's buggy chip without inserting a magic NOP.

  • RaymanRayman Posts: 14,744

    The new versions of Mega and Neo Yume seem to ignore the VGA_Basepin setting in config.spin2 and always uses 0 for basepin.
    Am I seeing this right?

  • @Rayman said:
    The new versions of Mega and Neo Yume seem to ignore the VGA_Basepin setting in config.spin2 and always uses 0 for basepin.
    Am I seeing this right?

    No? Why would that be the case? I change my basepin quite often.

  • RaymanRayman Posts: 14,744

    Ok, I see now my neoyume_upper is not actually compiling... Getting this error: Unable to open file `libc': No such file or directory

  • Wuerfel_21Wuerfel_21 Posts: 5,105
    edited 2023-05-29 20:32

    @Rayman said:
    Ok, I see now my neoyume_upper is not actually compiling... Getting this error: Unable to open file `libc': No such file or directory

    Either your flexspin is really outdated or your include directory isn't in the correct location (needs to be at ../include relative to flexspin.exe - inexplicably if you just unzip the cli-only releases it isn't like that. If you downloaded flexprop it should be right)

  • RaymanRayman Posts: 14,744
    edited 2023-05-29 20:45

    It looks like neoyume_upper.spin2 has c : "libc" instead of c : "libc.a" in the new version...
    Is that an error?

    Seems to compile after changing it...

  • Wuerfel_21Wuerfel_21 Posts: 5,105
    edited 2023-05-29 20:49

    No, it's an intentional change that has to do with constant resolution or something. It actually wants to include a libc.spin2 . If you don't have that file your flexspin is too old (mind the minimum version given in the README file).

  • RaymanRayman Posts: 14,744
    edited 2023-05-29 21:03

    Actually, new version didn't compile with change to libc.a. must have compiled an older version by accident.

    Anyway, thanks @Wuerfel_21 , all sorted now. Seems I had old flexprop, 5.9.21. I did already have new version, but must have reverted for some reason ...
    Working now with flexprop 6.0.5

  • Wuerfel_21Wuerfel_21 Posts: 5,105
    edited 2023-06-13 19:42

    I have now tagged out V1.2 for both emulators. Please use flexspin 6.1.6 to build.

    MegaYume changes since V1.1:

    • Allow $FC000 argv parameter to auto-select ROM
    • Fix loss of sync when toggling interlace in line-multiplied video modes
    • Use new USB driver (see below)
    • Multitap (4 player) support for some games
    • Improve error message when direct boot file is not found
    • Allow HyperRAM without reset pin
    • Make HyperRAM latency configurable

    NeoYume changes since V1.1:

    • Allow $FC000 argv parameter to auto-select game and BIOS
    • Very slightly improve load times
    • Expand gamedb to cover almost all known NeoGeo games
    • Use new USB driver (see below)
    • Allow HyperRAM without reset pin
    • Make HyperRAM latency configurable

    The main feature of course is the new USB driver, which allows for multiplayer using a hub and also allows using many more different controllers instead of the few hardcoded ones. The formerly hardcoded controllers still have built-in mappings, but others can be added using the PADMAP.TXT mechanism.

  • pik33pik33 Posts: 2,387





  • pik33pik33 Posts: 2,387
    edited 2023-08-14 07:35

    Version 6.3.0-beta-v6.2.3-24-g29c7014a Compiled on: Jul 31 2023

    OBJ vconst = "NeoVGA.spin2"
    CON
    
    '' This can be defined to skip game selection
    '#define DIRECT_BOOT game_mslug
    
    '' Allow $FC000 parameter passing.
    USE_ARGV = true
    
    '' Wether to use japanese AES BIOS (neo-po.bin) or export AES BIOS (neo-epo.bin)
    '' This affects text language and regional censorship.
    '' (choose between red blood and being able to read the text, lol)
    USE_JP_BIOS = false
    
    ' Enable one of these to select the exmem type to use
    #define USE_PSRAM16
    '#define USE_PSRAM8
    '#define USE_PSRAM4
    '#define USE_HYPER
    
    ' For PSRAM (either type)
    PSRAM_CLK = 56
    PSRAM_SELECT = 57
    PSRAM_BASE = 40
    PSRAM_BANKS = 1
    ' \/ Uncomment if PSRAM_BANKS = 1 for speedup
    #define USE_PSRAM_NOBANKS
    
    PSRAM_WAIT  = 5
    PSRAM_DELAY = 14
    PSRAM_SYNC_CLOCK = false
    PSRAM_SYNC_DATA = true
    
    ' \/ Uncomment for lameness
    '#define USE_PSRAM_SLOW
    
    
    ' For HyperRAM
    HYPER_ACCESSORY = 0 ' Base pin for P2EVAL HyperRAM board
    HYPER_CLK    =  8+HYPER_ACCESSORY
    HYPER_RWDS   = 10+HYPER_ACCESSORY
    HYPER_SELECT = 12+HYPER_ACCESSORY
    HYPER_BASE   =  0+HYPER_ACCESSORY
    HYPER_RESET  = 15+HYPER_ACCESSORY
    HYPER_BANKS  = 1 ' Note: multibank currently not implemented
    
    HYPER_LATENCY = 6
    HYPER_WAIT  = HYPER_LATENCY*4 - 2
    HYPER_DELAY = 14
    HYPER_SYNC_CLOCK = false
    HYPER_SYNC_DATA = false
    
    
    
    
    VIDEO_MODE = vconst.MODE_VGA3X
    VIDEO_SUBMODE = 0
    
    VGA_BASEPIN = 8
    VGA_VSYNC   = VGA_BASEPIN + 4
    
    
    'VIDEO_MODE = vconst.MODE_SVID_AND_COMP
    'VIDEO_SUBMODE = vconst.SUBMODE_NTSC
    
    'VGA_BASEPIN = 24
    'VGA_VSYNC   = -1
    
    
    'VIDEO_MODE = vconst.MODE_YPBPR
    'VIDEO_SUBMODE = 0
    
    'VGA_BASEPIN = 24
    'VGA_VSYNC   = -1
    
    
    'VIDEO_MODE = vconst.MODE_HDMI
    'VIDEO_SUBMODE = 0
    
    'VGA_BASEPIN = 0
    'VGA_VSYNC   = -1
    
    
    'VIDEO_MODE = vconst.MODE_LCD6
    'VIDEO_SUBMODE = vconst.LCD_ILI9342
    'VGA_BASEPIN = 0
    'VGA_VSYNC = (8<<0) + (9<<8) + (10<<16) + (11<<24)
    
    
    AUDIO_LEFT  = 8+6
    AUDIO_RIGHT = AUDIO_LEFT + 1
    
    ' \/ Uncomment for mono audio (still sent to both pins (you can set them to the same pin))
    '#define AUDIO_MIX_MONO
    
    
    '' Uncomment ONLY ONE of the below
    #define INPUT_USE_USB
    '#define INPUT_USE_PINS
    '#define INPUT_USE_SNES
    
    
    '' USB Keyboard/gamepad pins.
    USB0_BASEPIN = 16             ' USB port0/port1 pin block
    ENABLE_PIN   = 1              ' USB object enables port voltage protection
    DM_PIN       = 2              ' Add to BASEPIN
    
    
    '' Discrete pin inputs
    ' For active-low buttons: P_HIGH_15K | P_LOW_15K | P_INVERT_A
    ' For active-high buttons: P_HIGH_15K | P_LOW_15K | P_INVERT_OUTPUT
    PINPUT_PINMODE = P_HIGH_15K | P_LOW_15K | P_INVERT_OUTPUT
    PINPUT_DRIVE = false
    
    ' Set -1 if button not present
    PINPUT_P1_UP     = -1
    PINPUT_P1_DOWN   = -1
    PINPUT_P1_LEFT   = -1
    PINPUT_P1_RIGHT  = -1
    PINPUT_P1_A      = -1
    PINPUT_P1_B      = -1
    PINPUT_P1_C      = -1
    PINPUT_P1_D      = -1
    PINPUT_P1_START  = -1
    PINPUT_P1_SELECT = -1
    
    PINPUT_P2_UP     = -1
    PINPUT_P2_DOWN   = -1
    PINPUT_P2_LEFT   = -1
    PINPUT_P2_RIGHT  = -1
    PINPUT_P2_A      = -1
    PINPUT_P2_B      = -1
    PINPUT_P2_C      = -1
    PINPUT_P2_D      = -1
    PINPUT_P2_START  = -1
    PINPUT_P2_SELECT = -1
    
    SNES_CLK = -1
    SNES_LATCH = -1
    SNES_PLAYER1 = -1
    SNES_PLAYER2 = -1
    
    '#define SNES_LAYOUT_MINI_POSITIONAL
    '#define SNES_LAYOUT_ARCADE_POSITIONAL
    '#define SNES_LAYOUT_LETTERS
    '#define SNES_LAYOUT_COLORS
    
    '' Ignore stuff below
    
    #ifdef USE_PSRAM4
    #define USE_PSRAM_EITHER
    PSRAM_WIDTH = 4
    #endif
    #ifdef USE_PSRAM8
    PSRAM_WIDTH = 8
    #define USE_PSRAM_EITHER
    #endif
    #ifdef USE_PSRAM16
    PSRAM_WIDTH = 16
    #define USE_PSRAM_EITHER
    #endif
    #ifdef USE_PSRAM_SLOW
    PSRAM_CLKDIV = 3
    #else
    PSRAM_CLKDIV = 2
    #endif
    
    
  • hmm, looks like it's getting the wrong tiles... How strange. Will need to dig out my EC32MB and see if I can reproduce this at all.

    Perhaps double-check that your files didn't get corrupted or something. Probably not, but doesn't hurt.

  • pik33pik33 Posts: 2,387

    Both Metal Slug and Twinkle do the same. I don't know if my neo-epo is good. Downloaded from internet archive.

  • neo-epo should have nothing to do with that.

  • Just verified: have same compiler version (plus potentially buggy PR branch), both master and slot-interleave work for me (on P2STAMP hardware). May be PSRAM specific, will set up EC32MB later today.

    Also received some funny boards from @Rayman that also have 16 bit PSRAM.

  • @pik33 So I checked and

    Both branches are ok on the P2-STAMP, the EVAL+96MB and the EDGE 32MB. Compiler is Version 6.3.0-beta-W21-nextread-across-branch-v6.2.3-25-g42fb92a8 Compiled on: Aug 4 2023 which is the same as yours plus a feature PR that shouldn't matter.

    If you can't get any permutation to work, that's kindof concerning.

    Haven't tested HDMI mode right now, but just set VSYNC to 0, I think the example thing just got messed up. It needs to be zero to not reverse the pins.

  • Edges keep winning. Also tested LCD mode again. still works. I've kept this LCD connected to the Edge breakout... Though the wire mess fits better with the Stamp breakout I feel :)

  • Wuerfel_21Wuerfel_21 Posts: 5,105
    edited 2023-08-14 13:12

    Also, do indeed make sure that your files are OK. One of my SD cards did infact have a corrupted twinspri romset. The correct files have these CRCs:

    f7da64ab        224-c1.bin
    4c09bbfb        224-c2.bin
    c59e4129        224-c3.bin
    b5532e53        224-c4.bin
    364d6f96        224-m1.bin
    7697e445        224-p1.bin
    eeed5758        224-s1.bin
    ff57f088        224-v1.bin
    7ad26599        224-v2.bin
    

    I had a corrupt 224-c1.bin and the graphics were garbled.

  • pik33pik33 Posts: 2,387
    edited 2023-08-14 14:04

    That was it (except of course the yolkless cog workaround). c1 and c2 were different. It seems I have to delete my neogeo games folder as other games from there also don't work in the same way.

  • anyways, can you figure out how to work the interleave branch? Because I want to merge that into master eventually.

  • pik33pik33 Posts: 2,387

    Interleaved looks like this:

  • pik33pik33 Posts: 2,387

    .. and after I applied the workaround that runs the main program in cog #1 instead of #0, it works OK

    DAT ' startup code & zero page
                  org
                  coginit #1,##UPPER_LOAD
                  cogstop #0
                  orgh $14
    
  • With new versions of loadp2, it is to possible to start the emulators directly into a game using command line arguments.

    # neoyume needs a game id
    loadp2 neoyume_lower.binary -a mslug
    # megayume needs a file path
    loadp2 megayume_lower.binary -a /sd/sonic.bin
    
  • pik33pik33 Posts: 2,387
    edited 2023-09-12 21:07

    @Wuerfel_21 said:
    With new versions of loadp2, it is to possible to start the emulators directly into a game using command line arguments.

    # neoyume needs a game id
    loadp2 neoyume_lower.binary -a mslug
    # megayume needs a file path
    loadp2 megayume_lower.binary -a /sd/sonic.bin
    

    and I prepared, but not yet implemented, the possibility to pass parameters with brun command. The problem was simple, I had no controller to play with, so no motivation to run the emulator. Now I have 2 of them working :)

    I put the report about Vakoss buttons in the Basic's topic... for me it is strange but I have no experience with a gamepad button order.

  • RaymanRayman Posts: 14,744

    That will help me a lot for testing

  • Wuerfel_21Wuerfel_21 Posts: 5,105
    edited 2023-10-12 17:40

    So here's something funny. You remember how you can legally buy (by minor detour) some usable Neo-Geo ROMs on GoG?

    Well, they don't give you the AES BIOS, you still need to acquire that one somewhere else and I say so in NeoYume's README. I theorized that the MVS BIOS set they do ship originates from a pirate site. Well, Ark on Kubuntu displays ZIP comments.

    Yeeeep. So I think you couldn't fault someone for getting the AES BIOS off a shady site :)

    Though I did get some version of unibios to kinda work once, wonder if one of the images in there works smoothly enough to obviate the need to pirate anything. That'd be quite nice.

    EDIT: I remember now what the problem with UNIBIOS is - it seems to detect the hardware as an MVS and runs into the obvious backup RAM error. The error screen lets you force it to AES mode, but it's bugged and you actually have to push the joystick down instead of pressing B to do that. But hey, you can set softdips!

  • So I've tagged out a V1.3 of NeoYume. Changes since V1.2 (that was in June):

    • Assorted usbnew fixes
    • Made SD card pins configurable (for @Rayman 's silly boards)
    • Interleave some of the sprite transfer code to improve memory performance.
    • Add support for 240p Test Suite
    • Minor optimization for 68000's branch handling
    • Support using UniBIOS

    The UniBIOS thing is of course the major new feature. I've currently only really tried the latest 4.0 version, but I think the version you get with the gog.com BIOS set might also work. Needs checking. It uses a really weird way of detecting AES vs MVS, which is the state of the 3rd and 4th coin chute (????). Fixed that to match real AES and now it works fine.

    Anyways, there's some interesting things you can do with this. If you press A+B+C on the universe bios splash screen, you can enter into a menu that lets you change system type, region and game settings. There's also a nifty jukebox mode for playing the game's audio tracks. If you press Select+Start during the game, there's another interesting menu that pops up.

Sign In or Register to comment.