RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Philips P2000

    Scheduled Pinned Locked Moved Ideas and Development
    emulatorretropiephilipsp2000m2000
    8 Posts 2 Posters 2.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      datakneus
      last edited by

      Any chance in adding the Philips P2000 emulator by Marcel de Kogel to RetroPie?

      I believe the source code is available : here

      1 Reply Last reply Reply Quote 0
      • F
        Folly
        last edited by Folly

        Although this post is quite old it seems still relevant and it shoud be nice if it could be added to RetroPie.

        I did some investigation about the Philips P2000.

        The fastest way of emulating the P2000 is to use DOSbox and the P2000 emulator for DOS.
        This is my directory structure :
        /home/pi/RetroPie/roms/EmuOnDos/Philips_P2000T/M2000.exe (emulator)
        /home/pi/RetroPie/roms/EmuOnDos/Philips_P2000T/games (.cas files)
        /home/pi/RetroPie/roms/pc/EmuOnDos/P2000T (all executable .sh starters for .cas files)
        An .sh starter contains the following, were as "leeg.cas" can be any .cas file :
        /home/pi/RetroPie/roms/pc/EmuOnDos/P2000T/leeg.cas.sh :

        #!/bin/bash
        /opt/retropie/emulators/dosbox/bin/dosbox -fullscreen -scaler normal3x -c "@echo off" -c "mount c: ~/RetroPie/roms/EmuOnDos/Philips_P2000T" -c "cls" -c "c:" -c "m2000 -verbose 0 -boot 1 -tape games/leeg.cas" -c "exit"
        
        

        I also tested the source code on raspbian stretch.
        The source code is 22 years old but it still works.
        I've got the UNIX/X version working again by adding bpp!=24 in X.c.
        Compiled with :

        make -f Makefile.X
        

        Installed alsa-oss for OSS emulation though alsa

        sudo apt-get install alsa-oss
        

        A proper command, that works from every directory, can be (aoss is for sound):

        aoss /your/emulator/dir/m2000 -video 1 -boot 1 -tape /your/emulator/leeg.cas -font /your/emulator/dir/Default.fnt
        

        Beware, the emulator stops if the window is not active, so click on the emulator window.

        By the way : "I'm not that good in C programming, still learning".
        But it seems that for running this code in RetroPie there are a lot of to do's.

        To Do's :

        • make one universal version that can be run in X and also in RetroPie;
        • if in a window, add more windows scalablility;
        • add SDL video and audio;
        • if SDL audio is a problem then add Alsa audio;
        • remove SVGAlib version.

        Who has a good idea of making the source code work in RetroPie ???

        1 Reply Last reply Reply Quote 1
        • F
          Folly
          last edited by Folly

          @datakneus

          This is an update on running Philips P2000 emulator of Marcel de Kogel "M2000.exe" on lr-dosbox.

          Philips-P2000 on RPI4 32 bit OS (Buster) with lr-dosbox :

          Change a few core-options in /opt/retropie/configs/all/retroarch-core-options.cfg :

          dosbox_cpu_cycles = "9"
          dosbox_pcspeaker = "true"
          

          Make a bat file for example Lazy-Bug.bat :

          @echo off
          cls
          c:
          m2000 -verbose 0 -boot 1 -tape games/Lazy-Bug.cas
          exit
          

          Place it in :
          /home/pi/Desktop/roms/pc/P2000/Lazy-Bug.bat

          Games should be in :
          /home/pi/Desktop/roms/pc/P2000/games/Lazy-Bug.cas

          Emulator should be in :
          /home/pi/Desktop/roms/pc/P2000/M2000.EXE
          With these other files :
          BASIC.BIN CWSDPR0.EXE M2000.TXT
          CWSDPMI.DOC CWSPARAM.DOC P2000ROM.BIN
          CWSDPMI.EXE CWSPARAM.EXE
          CWSDPMI.ZIP DEFAULT.FNT

          Automatically make all .bat files from .cas files in /home/pi/Desktop/roms/pc/P2000/games/*.cas :
          open terminal and paste these commands :

          cd /home/pi/Desktop/roms/pc/P2000/
          for file in $(ls games | cut -d '.' -f 1); do touch $file.bat; echo -ne @echo off '\n'cls'\n'c:'\n'm2000 -verbose 0 -boot 1 -tape games/$file.cas'\n'exit > $file.bat; done
          
          

          Works pretty good :)

          2020-11-24-182636_800x600_scrot-resized.png 2020-11-24-182734_800x600_scrot-resized.png

          1 Reply Last reply Reply Quote 0
          • F
            Folly
            last edited by Folly

            I read somewhere that cassette support was added in lr-mess for the P2000T.
            (EDIT : found proof of it (Erwin Jansen is busy with it): https://github.com/libretro/mame/blob/master/src/mame/machine/p2000t_mdcr.h )

            Nowadays there are many systems added through valerino's setup scripts.
            So I made a "valerino alike" script for installing p2000t for lr-mess to see if it could work with -cass files.

            Copied the bios files in the root of the BIOS directory.
            p2000t.zip
            saa5050.zip

            Extracted the command from the log for running manually, for testing :

            With cass file ( initializing error / no boot, log Error: unknown option: -cass) :

            /home/pi/RetroPie-Setup/scriptmodules/run_mess.sh /opt/retropie/emulators/retroarch/bin/retroarch /opt/retropie/libretrocores/lr-mess/mess_libretro.so /opt/retropie/configs/p2000t/retroarch.cfg p2000t /home/pi/RetroPie/BIOS -cass "/home/pi/RetroPie/roms/p2000t/Lazy-Bug.cas" --appendconfig /dev/shm/retroarch.cfg

            Without cass file (it boots in colour) :

            /home/pi/RetroPie-Setup/scriptmodules/run_mess.sh /opt/retropie/emulators/retroarch/bin/retroarch /opt/retropie/libretrocores/lr-mess/mess_libretro.so /opt/retropie/configs/p2000t/retroarch.cfg p2000t /home/pi/RetroPie/BIOS --appendconfig /dev/shm/retroarch.cfg

            Conclusion (binary version of lr-mess) :
            With the latest binary from Retropie no cass support yet.

            Conclusion (source version of lr-mess) :
            ?not tested yet?

            2020-11-24-194217_1600x900_scrot-resized-resized.png

            1 Reply Last reply Reply Quote 0
            • F
              Folly
              last edited by Folly

              Today I installed the lr-mess source code version to test if cassette support has been added for P2000T.

              I CAN CONFIRM THAT CASSETTE SUPPORT HAS BEEN ADDED AND WORKING.

              Thank you Erwin Jansen.
              Nice job !!!

              Automatically booting, see the upper-left corner.

              2020-12-13-124319_800x600_scrot-resized.png 2020-12-13-124456_800x600_scrot-resized.png

              F 1 Reply Last reply Reply Quote 0
              • F
                Folly @Folly
                last edited by Folly

                @theburgerking

                I read your thread on P2000T.

                Perhaps you find this interesting.

                It is still an early discovery, so not all information/scripts are available yet.

                But it seems to work pretty good !

                Early steps to install :

                • use @valerino's fork of RetroPie-Setup (https://github.com/valerino/RetroPie-Setup)
                • install lr-mess from source (can take up to 6 hours on pi4)
                • add the P2000T valerino alike script from (00-scriptmodules-00/libretrocores) : https://github.com/FollyMaddy/RetroPie-Share
                • copy this to : /home/pi/RetroPie-Setup/scriptmodules/libretrocores
                • install lr-mess-p2000t.sh in RetroPie-Setup
                • add p2000t.zip & saa5050.zip to /home/pi/RetroPie/BIOS
                • place the cas files in : /home/pi/RetroPie/roms/p2000t
                1 Reply Last reply Reply Quote 0
                • F
                  Folly
                  last edited by Folly

                  This is an update on running P2000T on an original RetroPie version.

                  • install lr-mess from source (can take up to 6 hours on pi4)
                  • install run_mess.sh from the valerino fork
                  wget -nv -O /home/pi/RetroPie-Setup/scriptmodules/run_mess.sh https://raw.githubusercontent.com/valerino/RetroPie-Setup/master/scriptmodules/run_mess.sh
                  
                  
                  • install lr-mess-p2000t.sh in RetroPie-Setup
                  wget -nv -O /home/pi/RetroPie-Setup/scriptmodules/libretrocores/lr-mess-p2000t.sh https://raw.githubusercontent.com/FollyMaddy/RetroPie-Share/main/00-scriptmodules-00/libretrocores/lr-mess-p2000t.sh
                  
                  
                  • add p2000t.zip & saa5050.zip to /home/pi/RetroPie/BIOS
                  • place the cas files in : /home/pi/RetroPie/roms/p2000t
                  F 1 Reply Last reply Reply Quote 0
                  • F
                    Folly @Folly
                    last edited by Folly

                    This is an update on running P2000T using the m2000 emulator by Marcel de Kogel.
                    (as described in the first post)

                    I made a module-script for it :

                    Place it in your RetroPie-Setup folder with :

                    wget -nv -O /home/pi/RetroPie-Setup/scriptmodules/emulators/p2000t.sh https://raw.githubusercontent.com/FollyMaddy/RetroPie-Share/main/00-scriptmodules-00/emulators/p2000t.sh
                    
                    

                    Then :

                    • Install the module-script inside your RetroPie-Setup
                    • Place the cas files in : /home/pi/RetroPie/roms/p2000t
                    • When booting a .cas, select m2000 as the emulator

                    Here is some explanation on what the module-script does to get this emulator working properly :

                    • It installs xorg, matchbox-window-manager and alsa-oss in needed
                    • It gets the emulator source code of m2000 by Marcel de Kogel
                    • It patches the X.c file :
                      • adding 24 Bits Per Pixel
                      • changing video mode 1 to 640x480
                      • It makes a boot-script so m2000 runs in lightweight X enviroment (matchbox-window-manager) and uses oss audio simulation (aoss) to get proper sound
                      • It adds the default video mode of 640x480@75hz to /opt/retropie/configs/all/videomodes.cfg"
                        If it doesn't work for you, then select a better 640x480 video-mode or framebuffer-mode in the boot-menu
                    • It installs everything

                    Hopefully more people will enjoy this.

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post

                    Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                    Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.