LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Trying to run abandonware in 16 Bits mode (https://www.linuxquestions.org/questions/slackware-14/trying-to-run-abandonware-in-16-bits-mode-4175612716/)

inukaze 08-27-2017 09:20 AM

Trying to run abandonware in 16 Bits mode
 
Hello again. right now i am trying to run "Midtown Madness" via wine. and well i had make 3 ways for this, but in the 2 first i got errors, ok i open the terminal and try to use the follow commands :

0 ) Before start, follow xdpyinfo i had the follow extensions :
Code:

xdpyinfo
number of extensions: 30
BIG-REQUESTS
Composite
DAMAGE
DOUBLE-BUFFER
DPMS
DRI2
GLX
Generic Event Extension
MIT-SCREEN-SAVER
MIT-SHM
NV-CONTROL
NV-GLX
Present
RANDR
RECORD
RENDER
SHAPE
SYNC
X-Resource
XC-MISC
XFIXES
XFree86-DGA
XFree86-VidModeExtension
XINERAMA
XINERAMA
XInputExtension
XKEYBOARD
XTEST
XVideo
XVideo-MotionCompensation

1) Trying with Xnest
Code:

Xnest :1 -depth 16 &
(EE)
Fatal server error:
(EE) Unable to find desired default visual.
(EE)

[1]+  Exit 1                Xnest :1 -depth 16

2) Trying with Xephyr "NV-GLX" don't work

Code:

Xephyr -ac -screen 640x480x16 -br -reset -terminate :2.0 +extension Composite +extension DAMAGE +extension DOUBLE-BUFFER +extension DPMS +extension GLX +extension RANDR +extension RENDER +extension X-Resource +extension XFIXES +extension NV-GLX -title "Inukaze - Microsoft Midtown Madness (Chicago Edition)" &

[mi] Extension "NV-GLX" is not recognized
[mi] Only the following extensions can be run-time enabled:
[mi]    Generic Events
[mi]    Composite
[mi]    DAMAGE
[mi]    DOUBLE-BUFFER
[mi]    DPMS
[mi]    GLX
[mi]    MIT-SCREEN-SAVER
[mi]    MIT-SHM
[mi]    RANDR
[mi]    RENDER
[mi]    X-Resource
[mi]    XFIXES
[mi]    XINERAMA
[mi]    XTEST
[mi]    XVideo

DISPLAY=:2 wine "C:\Program Files (x86)\Microsoft Games\Midtown Madness\MidTown.Exe"
preloader: Warning: failed to reserve range 00010000-00110000
preloader: Warning: failed to reserve range 0000000000010000-0000000000110000
preloader: Warning: failed to reserve range 0000000000010000-0000000000110000
preloader: Warning: failed to reserve range 0000000000010000-0000000000110000
preloader: Warning: failed to reserve range 0000000000010000-0000000000110000
preloader: Warning: failed to reserve range 0000000000010000-0000000000110000
preloader: Warning: failed to reserve range 00010000-00110000
preloader: Warning: failed to reserve range 0000000000010000-0000000000110000
fixme:ver:GetCurrentPackageId (0x33ea8c (nil)): stub
fixme:ver:GetCurrentPackageId (0x33f34c (nil)): stub
fixme:ver:GetCurrentPackageId (0x8ddb8c (nil)): stub
preloader: Warning: failed to reserve range 0000000000010000-0000000000110000
fixme:process:WTSGetActiveConsoleSessionId stub
fixme:wtsapi:WTSEnumerateSessionsW Stub (nil) 0x00000000 0x00000001 0x8ddf98 0x8ddf9c
fixme:wtsapi:WTSFreeMemory Stub (nil)
fixme:wtsapi:WTSQuerySessionInformationW Stub (nil) 0x00000001 5 0x8de074 0x8de078
SetPRocessAffinityMask found and called.
ERROR:
************* EXCEPTION CATCHING DISABLED! Please don't commit this.

fixme:ddraw:DirectDrawEnumerateExA flags 0x00000006 not handled
Xlib:  extension "NV-GLX" missing on display ":2".
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  150 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Value in failed request:  0x0
  Serial number of failed request:  152
  Current serial number in output stream:  153

3 ) The unique way run, but i want to make it more automatizated, i just have a problem with this, is i need to detach a command and run another.


Code:

su -c "agetty -a inukaze --noclear tty5 &" root

setsid sh -c 'exec xinit /usr/share/playonlinux/playonlinux --run "Microsoft Midtown Madness 1 Chicago Edition" %F -- :1 vt6 -ac -depth 16 & ; DISPLAY=:1 /usr/bin/xrandr -s 640x480 <> /dev/tty5 >&0 2>&1

Ok my unique problem here is this part
Code:

-ac -depth 16 & ; DISPLAY=:1
Well when i say before, i need detach and run another command, but CLI don't allow this using "& ;" because is a logical error

Someone have an idea for solve this ?

My idea is make a script to run login me in the tty5 (prefer i not want need root for that) , run on the tty5 the "exec init" to run PlayOnLinux and load Midtown Madness in tty6, immediately change the resolution to set 640x480 resolution inside the tty6.

Ok for make more automatized i need
1 - Login my same user of tty7 on tty5 without root permissions
the current way i use is with this command
Code:

su -c "agetty -a inukaze --noclear tty5 &" root
2 - i make a script called "prueba.sh" with the follow content
Code:

# Run a new X Session on tty5 in 16 Bpp, inside the new X Session on tty5 Run PlayOnLinux, PlayOnLinux run the Link/Shortcut "Microsoft Midtown Madness 1 Chicago Edition"
setsid sh -c 'exec xinit /usr/share/playonlinux/playonlinux --run "Microsoft Midtown Madness 1 Chicago Edition" %F -- :1 vt5 -ac -depth 16 <> /dev/tty5 >&0 2>&1' &

# Wait for Midtown Madness Start
until pids=$(pidof midtown.exe)
do 
    sleep 1
done

# Midtown has now started.
# Now change the resolution to 640x480
for pid in $pids
do       
    DISPLAY=:1 /usr/bin/xrandr -s 640x480
done

3 - The unique thing i need get tty5 without root permission to make i wish :D

If someone have the game too i explain what i do :

1 - Mount Midtown Madness ISO

2 - Install it on PlayOnLinux using wine 1.8.6

3 - Make a Link/Shortcut with the name "Microsoft Midtown Madness 1 Chicago Edition"

4 - Open a terminal and use the follow commands :
Code:

su -c "agetty -a inukaze --noclear tty5 &" root
$HOME/prueba.sh

5 - Enjoy it

business_kid 08-27-2017 12:13 PM

Personally, if it won't run in dosbox, I'd be tempted to give up quickly. Abandonware of the 16 bit vintage wasn't that great.
/Begin history lesson
The pc started life as 16 bit, with basically no video resolution, no vga, next to no memory or disk space, a software A20 handler, and a myopic hardware design. As modern parts came into use, loads of software hacks to make up for a limited hardware design were necessary, and these self imposed limitations have been overcome. There were good reasons linux needed a 32bit '386 at minimum. An attempt to port it to 16 bits failed.
/End history lesson

I'd see time better spent on a SNES or Sega Megadrive if you want vintage gaming from the last millenium. The Megadrive had a 68000 cpu, and my young kids spent many happy hours on one, and sneered at any forced by bad parental choice to use a SNES. Try ebay.

inukaze 08-27-2017 01:05 PM

Quote:

Originally Posted by business_kid (Post 5752513)
I'd see time better spent on a SNES or Sega Megadrive if you want vintage gaming from the last millenium. The Megadrive had a 68000 cpu, and my young kids spent many happy hours on one, and sneered at any forced by bad parental choice to use a SNES. Try ebay.

All my home consoles were stolen from me a couple of years ago from my own home except for the Sega Master System, I am from Venezuela, an buy a console today is impossible, all money from my 3 jobs is just for get food, because it is for the only thing that reaches the money.

Before making suggestions, you should first read the post.

This post about how to detach a command an immediately run another command. apart from that, Midtown Madness does not exist for Snes or Megadrive, PlayStation, Sega Saturn. Because it is a pc exclusive. and just can run in a 16 Bpp environment. In this case specifically to run a video game of yesteryear

Here a video with another X session working, i just want to make it more automatized :
http://www.dailymotion.com/video/x5y0nyp

business_kid 08-28-2017 03:39 AM

2 commands?
Code:

command1 & command2
as long as they do not hog output.

If that was all you wanted, you sure posted enough stuff to lose most people (myself included).

inukaze 08-29-2017 01:04 AM

Quote:

Originally Posted by business_kid (Post 5752747)
2 commands?
Code:

command1 & command2
as long as they do not hog output.

If that was all you wanted, you sure posted enough stuff to lose most people (myself included).

i need some method to not use

command 1 & ; command 2

detach command 1 and run the command 2

bassmadrigal 08-29-2017 06:54 AM

Quote:

Originally Posted by inukaze (Post 5753184)
i need some method to not use

command 1 & ; command 2

detach command 1 and run the command 2

You can't use a semicolon directly after an ampersand... both signify the end of a command, so after you run something and background it (using the ampersand), you are free to have another command on the same line. But if you have a semicolon directly after the ampersand, bash doesn't understand it because there's no command in front of it.

Basically, a semicolon means bash needs to wait for the command to finish before it can run the next command, whereas the ampersand will "background" the first task, allowing it to run in the background and then it can move on and run the next command. Either way, all these commands can be on the same or different lines. Bash doesn't care. So:

Code:

command 1 & command 2 ; command 3
is the same as

Code:

command 1 &
command 2
command 3

We're just able to write them on the same line if it makes it easier to do, but they're both processed exactly the same by bash, so write it so it's easy for you and others to understand what the commands do.

inukaze 08-29-2017 09:12 PM

Well i finally solved put all things i need on a script.

Here is the script code :
Code:

MD5SUM=$(whereis -B "/usr/sbin" "/usr/local/sbin" "/sbin" "/usr/bin" "/usr/local/bin" "/bin" -b md5sum        | grep -i "md5sum" | cut -d " " -f02)
MD5SUM=$(echo $MD5SUM | awk -F'/' '/^/ { print $4 }')
SOFTWARE="MMM1CE"
TITULO="Microsoft Midtown Madness 1 Chicago Edition"
RUTA_DEL_PREFIJO="$HOME/.PlayOnLinux/wineprefix/InukazeMidtownMadness"
RUTA_DEL_SOFTWARE="$RUTA_DEL_PREFIJO/drive_c/Inukaze/Videojuegos/Abandonware/Windows/MidtownMadness1ChicagoEdition/"
RUTA_SYSTEM32="$RUTA_DEL_PREFIJO/drive_c/windows/system32/"
RUTA_SYSWOW64="$RUTA_DEL_PREFIJO/drive_c/windows/syswow64/"
VERSION_WINE=$(cat "$RUTA_DEL_PREFIJO/playonlinux.cfg" | grep VERSION= | sed 's/VERSION.//')

echo '
Autor ----------------> Inukaze ( Venezuela )
Sitio ----------------> inukaze.wordpress.com
Correo-E -------------> inukaze.otaku@gmail.com
Licencia -------------> GPL 2

******* Inicio : Acerca de este Script ********
                                 
  Yo intento escribir scripts compatibles con
  sistemas operativos Unix & POSIX , y otros
  sistemas operativos que soporten versiones
  De la API "Wine ITS NOT EMULATOR" , este
  nombre es un Acronimo y traducido al
  espaņol es "Wine NO ES UN EMULADOR"
  mejor conocida como "W.i.n.e"
 
  Basicamene la funcion de Wine es traducir
  mediante capas de abstraccion cosas hechas
  para que funcionen nativamente en sistemas
  Microsoft como MS-D.o.s & Windows para ser
  Ejecutados "Como Nativo" de Sistemas POSiX
  Sin la necesidad de tener instalado ningun
  Sistema Operativo Microsoft.

  Este es mi adaptacion para compatibilidad
  Con el gestor de varias versiones de Wine
  Conocido como "PlayOn(Linux/Mac)" .
 
  Para ofrecer mayor comodidad con los juegos
  Autocontenidos que poseeo.

******** Fin : Acerca de este Script **********

Comenzando ---> '$TITULO'
'

# Solucion de Resolucion
echo `xrandr --current | grep current | awk '{print $8}'` >> /tmp/ancho
echo `xrandr --current | grep current | awk '{print $10}'` >> /tmp/alto
cat /tmp/alto | sed -i 's/,//g' /tmp/alto
ANCHO=$(cat /tmp/ancho)
ALTO=$(cat /tmp/alto)
rm /tmp/ancho /tmp/alto
echo "$ANCHO"'x'"$ALTO" >> /tmp/Resolucion
Resolucion=$(cat /tmp/Resolucion)
rm /tmp/Resolucion
# Solucion de Resolucion

# Obtener el nombre del nucleo del sistema
Nucleo=$(uname -s)
case "$Nucleo" in
        Linux)                Nucleo="linux"                                                ;;
        FreeBSD)        Nucleo="freebsd"                                        ;;
        GNU/kFreeBSD)        Nucleo="freebsd"                                        ;;
        * ) echo "Tu Sistema Operativo -> NO ESTA SOPORTADO"                        ;;
esac

# Determinando la arquitectura de la maquina
#Arquitectura=$(uname -m)
Arquitectura=$(cat "$RUTA_DEL_PREFIJO/playonlinux.cfg" | grep ARCH= | sed 's/ARCH.//')
case "$Arquitectura" in
    x86)        Arquitectura="x86"                                        ;;
    i?86)        Arquitectura="x86"                                        ;;
    amd64)        Arquitectura="amd64"                                        ;;
    x86_64)        Arquitectura="amd64"                                        ;;
* ) echo    "Tu Arquitectura '$Arquitectura' -> NO ESTA SOPORTADA."        ;;
esac

        if [ $Arquitectura = "x86" ]; then
                RUTA_WINE="$HOME/.PlayOnLinux/wine/$Nucleo-$Arquitectura/$VERSION_WINE"
                PATH="$RUTA_WINE/bin:$PATH"
                export WINESERVER="$RUTA_WINE/bin/wineserver"
                export WINELOADER="$RUTA_WINE/bin/wine"
                export WINEDLLPATH="$RUTA_WINE/lib"
                export WINEPREFIX="$RUTA_DEL_PREFIJO"
export WINEDEBUG="-all"
                export WINEDLLOVERRIDES=mshtml=wine cmd echo test
                echo
                export LD_PRELOAD="libpthread.so.0 libGL.so.1" ; echo "PreIniciando : libpthread.so.0 libGL.so.1"
                export __GL_SYNC_TO_VBLANK=0 ; echo "Sincronizacion Vertical = DesActiva"
                export __GL_YIELD="NOTHING" ; echo "Sometimiento GL : Ninguno"
                echo

                if [[ $VERSION_WINE =~ "CSMT" ]]
                        then
                                echo
                                export CSMT=enable ; echo "CSMT Activado"
                                echo                               
                fi
                Arquitectura="32 Bits"

        elif [ $Arquitectura = "amd64" ]; then
                RUTA_WINE="$HOME/.PlayOnLinux/wine/$Nucleo-$Arquitectura/$VERSION_WINE"
                PATH="$RUTA_WINE/bin:$PATH"
                export WINESERVER="$RUTA_WINE/bin/wineserver"
                export WINELOADER="$RUTA_WINE/bin/wine"
                export WINEDLLPATH="$RUTA_WINE/lib"
                export WINEPREFIX="$RUTA_DEL_PREFIJO"
export WINEDEBUG="-all"
                export WINEDLLOVERRIDES=mshtml=wine cmd echo test
                echo
                export LD_PRELOAD="libpthread.so.0 libGL.so.1" ; echo "PreIniciando : libpthread.so.0 libGL.so.1"
                export __GL_SYNC_TO_VBLANK=0 ; echo "Sincronizacion Vertical = DesActiva"
                export __GL_YIELD="NOTHING" ; echo "Sometimiento GL : Ninguno"
                echo
                Arquitectura="64 Bits"

                if [[ $VERSION_WINE =~ "CSMT" ]]
                        then
                                echo
                                export CSMT=enable ; echo "CSMT Activado"
                                echo
                fi
        else
                echo "Arquitectura NO SOPORTADA"
                exit 1
        fi

# Muestra en la terminal La arquitectura &
# La version especifica de Wine usada
VERSION_WINE=$(wine --version)
echo ""
echo ""
echo "Corriendo '$VERSION_WINE' en '$Nucleo' ( Maquina de '$Arquitectura' )"

# Comprobrar que (No/)Existen los archivos y rutas, antes de proceder
if test -d "$HOME/.PlayOnLinux/wineprefix/InukazeMidtownMadness"
        then
        echo
                        if test -f "$HOME/.PlayOnLinux/wineprefix/InukazeMidtownMadness/drive_c/Inukaze/Videojuegos/Abandonware/Windows/MidtownMadness1ChicagoEdition/midtown.exe"
                        then
                                echo "Encontrado ejecutable de Midtown Madness 1 Chicago Edition en el prefijo de Inukaze"
                        fi               
        else
                echo "Midtown Madness no esta instalado en el Prefijo de Inukaze"
                xmessage -timeout 3 "Midtown Madness no esta instalado en el Prefijo de Inukaze"
                exit 1
fi

if test -f "$HOME/.PlayOnLinux/wineprefix/InukazeMidtownMadness/playonlinux.cfg"
        then
        # Obtener la version de WINE y su arquitectura del Prefijo Steam dentro de PlayOnLinux ;
        VERSION_WINE=$(cat "$HOME/.PlayOnLinux/wineprefix/InukazeMidtownMadness/playonlinux.cfg" | grep VERSION= | sed 's/VERSION=//g')
        ARQUITECTURA_WINE=$(cat "$HOME/.PlayOnLinux/wineprefix/InukazeMidtownMadness/playonlinux.cfg" | grep ARCH= | sed 's/ARCH=//g')
        else
                echo "Steam no esta instalado en el Prefijo Predeterminado"
                xmessage -timeout 3 "Steam no esta instalado en el Prefijo Predeterminado"
                exit 1
fi

# Modo Ventana/Pantalla Completa :
echo "REGEDIT4" >> /tmp/modo_ventana.reg
echo "" >> /tmp/modo_ventana.reg
echo "[HKEY_CURRENT_USER\Software\Wine\Explorer]" >> /tmp/modo_ventana.reg
echo '"Desktop"="Default"' >> /tmp/modo_ventana.reg
echo "" >> /tmp/modo_ventana.reg
echo "[HKEY_CURRENT_USER\Software\Wine\Explorer\Desktops]" >> /tmp/modo_ventana.reg

# Para Activar el Modo Ventana :
echo '"Default"'='"'"640x480"'"' >> /tmp/modo_ventana.reg

# Para DesActivar el Modo Ventana :
#echo '"Default"'='"'""'"' >> /tmp/modo_ventana.reg

regedit -s /tmp/modo_ventana.reg
rm -rf /tmp/modo_ventana.reg
2>/dev/null 1>/dev/null killall -9 services.exe winedevice.exe plugplay.exe explorer.exe &> /dev/null


# Ejecutando Programa / Software / Juego
echo
echo "Informacion :"
echo "Arquitectura -> `uname -m` ($Arquitectura) "
echo "DEBUG        -> $WINEDEBUG "
echo "Prefijo        -> $WINEPREFIX"
echo "Cargador -> $WINELOADER"
echo "Servidor -> $WINESERVER"
echo ""
echo ""

        sleep 1
        cd "$RUTA_DEL_SOFTWARE"

        #Esto lo agregare para mi debido a que cuando cambio
        #a Ciertas Resoluciones me muestra "Entrada No Adm."
        #y no tengo idea de como bloquearlas , para que cambie
        #A Resoluciones que si sirvan y no muestren eso.

        # Solo deja la linea asi :
        # $(xrandr -s 800x600 -r 79)

        #$(xrandr -s 800x600) #-r 79)

        echo "Ejecutando el Software"
        echo "$SOFTWARE"
        EJECUTABLE=$( ls midtown.exe )
        exec xinit "$RUTA_WINE/bin/wine" midtown.exe "$@" -- :1 vt6 -ac -depth 16 &

        # Esperar que "Midtown Madness" Inicie
        until pids=$(pidof midtown.exe)
        do 
            sleep 1
        done

        # Cuando "midtown.exe" haya sido iniciado
        # Cambiar la resolucion de la tty6 en 640x480
        for pid in $pids
        do       
            DISPLAY=:1 /usr/bin/xrandr -s 640x480
        done
       
        sleep 2
        EJECUTABLEPID=$(pidof $EJECUTABLE)
        taskset -p 0xFFFFFFFF $EJECUTABLEPID

        while Launchers=$( pidof "midtown.exe" )
                do 
                        sleep 1       
                done
       
                        #RestaurarResolucion=$(xrandr -s $Resolucion)
                        #2>/dev/null 1>/dev/null killall -9 pulseaudio "$EJECUTABLE" pulseaudio plugplay.exe winedevice.exe services.exe explorer.exe wineserver &> /dev/null
                       
exit 0



All times are GMT -5. The time now is 11:39 AM.