Whats up with DOSBox?
  • Order of the Butterfly
    Order of the Butterfly
    dIGIMAN
    Posts: 273 from 2005/11/7
    Hi,

    is there any chance there will be a new DOSBox Port for Amiga?

    The 0.7 has intresting new functions,
    which may make some more stuff work.

    Just thinking as it seems the porting seemed to stopp at
    ver 0.63.
  • »10.05.07 - 20:53
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    C64Days
    Posts: 103 from 2006/2/27
    From: Italy
    Mariusz Barczyk was the managing the DosBox ports, he's given up so far and told me that he didn't release version 0.65 because of odd behaviours with keyboards, i've notified him that that has been solved already in the OS4 (and every other port) by upgrading a plain text config file and that should have had been enough to import that config from any other archive. At the time he had five compiles and had to check which one was the genuine but he didn't update me yet (6 months have passed meanwhile) on the subject.
  • »12.05.07 - 12:23
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    dIGIMAN
    Posts: 273 from 2005/11/7
    Ok, thanks.

    Before i didnt even notice that there is a up to date OS4 Port of DOSBox.
    To bad, 0.7 supports protected mode, etc.

    Well maybe Itix finishes a new release of his OS4Emu this Weekend, as it didnt happend the last ones :)
    and lets cross fingers it will run DOSBox.
  • »14.05.07 - 22:02
    Profile Visit Website
  • MorphOS Developer
    CISC
    Posts: 619 from 2005/8/27
    From: the land with ...
    How about just one of you lazy bums just port/recompile it? :P


    - CISC
  • »14.05.07 - 23:06
    Profile
  • Butterfly
    Butterfly
    Posts: 62 from 2004/9/8
    From: France
    I tried to compile dosbox0.70 for morphos but I have a little problem...

    configure of dosbox for do a makefile is ok...
    sdl-config is ok too...

    but If I compile with make, I have a mistake:

    Making all in core_full
    make[1]: Entering directory `/DEV/dosbox-0.70/src/cpu/core_full'
    make[1]: Nothing to be done for `all'.
    make[1]: Leaving directory `/DEV/dosbox-0.70/src/cpu/core_full'
    Making all in core_normal
    make[1]: Entering directory `/DEV/dosbox-0.70/src/cpu/core_normal'
    make[1]: Nothing to be done for `all'.
    make[1]: Leaving directory `/DEV/dosbox-0.70/src/cpu/core_normal'
    Making all in core_dyn_x86
    make[1]: Entering directory `/DEV/dosbox-0.70/src/cpu/core_dyn_x86'
    make[1]: Nothing to be done for `all'.
    make[1]: Leaving directory `/DEV/dosbox-0.70/src/cpu/core_dyn_x86'
    make[1]: Entering directory `/DEV/dosbox-0.70/src/cpu'
    source='cpu.cpp' object='cpu.o' libtool=no \
    depfile='.deps/cpu.Po' tmpdepfile='.deps/cpu.TPo' \
    depmode=gcc /bin/sh ../../depcomp \
    g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include -noixemul -I/usr/include/SDL -g -O2 -c -o cpu.o `test -f 'cpu.cpp' || echo './'`cpu.cpp
    cpu.cpp:41: warning: invalid character in macro parameter name
    cpu.cpp:41: badly punctuated parameter list in `#define'
    make[1]: *** [cpu.o] Error 1
    make[1]: Leaving directory `/DEV/dosbox-0.70/src/cpu'
    make: *** [all-recursive] Error 1


    src of cpu.cpp :
    /*
    * Copyright (C) 2002-2007 The DOSBox Team
    *
    * This program is free software; you can redistribute it and/or modify
    * it under the terms of the GNU General Public License as published by
    * the Free Software Foundation; either version 2 of the License, or
    * (at your option) any later version.
    *
    * This program is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    * GNU General Public License for more details.
    *
    * You should have received a copy of the GNU General Public License
    * along with this program; if not, write to the Free Software
    * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    */

    /* $Id: cpu.cpp,v 1.98 2007/02/22 08:35:34 qbix79 Exp $ */

    #include <assert.h>
    #include <sstream>
    #include "dosbox.h"
    #include "cpu.h"
    #include "memory.h"
    #include "debug.h"
    #include "mapper.h"
    #include "setup.h"
    #include "paging.h"
    #include "support.h"

    Bitu DEBUG_EnableDebugger(void);
    extern void GFX_SetTitle(Bit32s cycles ,Bits frameskip,bool paused);

    #if 1
    #undef LOG
    #if defined (_MSC_VER)
    #define LOG(X,Y)
    #else
    #define LOG(X,Y) CPU_LOG
    #define CPU_LOG(...) <--- here is my problem
    #endif
    #endif

    //etc....


    I don't understand why :(
    Can you help me ???

    PS: sorry for my bad english :(


    [ Edited by rusback on 2007/5/15 17:13 ]
    PegasosII G4 512Mo 80Go ATI RADEON 9200SE....
    Yeah! The best it's MorphOS :)
  • »15.05.07 - 04:56
    Profile Visit Website
  • MorphOS Developer
    CISC
    Posts: 619 from 2005/8/27
    From: the land with ...
    Quote:

    [...]
    #define CPU_LOG(...) <--- here is my problem
    #endif
    #endif

    //etc....


    I don't understand why :(
    Can you help me ???


    Sure thing, this one's quite simple...

    Macros with varargs isn't supported in the version of g++ you have, this is fixed in the new version made available on MDC yesterday, go fetch! ;)


    - CISC
  • »15.05.07 - 21:57
    Profile
  • Butterfly
    Butterfly
    Posts: 62 from 2004/9/8
    From: France
    @CISC: ok.. thanks :)
    My compilation works better but I have a second little problem now...

    for dos.cpp, GCC tell me:
    g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include -noixemul -I/usr/include/SDL -g -O2 -c -o dos.o dos.cpp
    In file included from dos.cpp:28:
    ../../include/callback.h:93: parse error before `{'
    ../../include/callback.h:93: parse error before `char'
    ../../include/callback.h:93: parse error before `->'
    ../../include/callback.h:93: parse error before `->'
    ../../include/callback.h:93: parse error before `->'
    ../../include/callback.h:93: ANSI C++ forbids declaration `_Allocate_re' with no type
    ../../include/callback.h:93: ANSI C++ forbids initialization of member `_Allocate_re'
    ../../include/callback.h:93: making `_Allocate_re' static
    ../../include/callback.h:93: ANSI C++ forbids in-class initialization of non-const static member `_Allocate_re'
    ../../include/callback.h:93: field initializer is not constant
    ../../include/callback.h:93: declaration of `int CALLBACK_HandlerObject::_Allocate_re'
    ../../include/callback.h:93: conflicts with previous declaration `void * CALLBACK_HandlerObject::_Allocate_re'
    ../../include/callback.h:93: ANSI C++ forbids declaration `_Allocate_re' with no type
    ../../include/callback.h:93: declaration of `int CALLBACK_HandlerObject::_Allocate_re'
    ../../include/callback.h:93: conflicts with previous declaration `void * CALLBACK_HandlerObject::_Allocate_re'
    ../../include/callback.h:93: duplicate member `CALLBACK_HandlerObject::_Allocate_re'
    ../../include/callback.h:93: duplicate member `CALLBACK_HandlerObject::_Allocate_re'
    ../../include/callback.h:93: parse error at null character
    ../../include/callback.h: In function `Bit16u Get_callback()':
    ../../include/callback.h:94: `m_callback' undeclared (first use this function)
    ../../include/callback.h:94: (Each undeclared identifier is reported only once
    ../../include/callback.h:94: for each function it appears in.)
    ../../include/callback.h: At top level:
    ../../include/callback.h:97: parse error before `}'
    dos.cpp: In method `DOS::DOS(Section *)':
    dos.cpp:1059: no matching function for call to `CALLBACK_HandlerObject::Set_RealVec (int)'
    dos.cpp:1062: no matching function for call to `CALLBACK_HandlerObject::Set_RealVec (int)'
    dos.cpp:1065: no matching function for call to `CALLBACK_HandlerObject::Set_RealVec (int)'
    dos.cpp:1068: no matching function for call to `CALLBACK_HandlerObject::Set_RealVec (int)'
    dos.cpp:1071: no matching function for call to `CALLBACK_HandlerObject::Set_RealVec (int)'
    dos.cpp:1074: no matching function for call to `CALLBACK_HandlerObject::Set_RealVec (int)'
    dos.cpp:1077: no matching function for call to `CALLBACK_HandlerObject::Set_RealVec (int)'
    make[3]: *** [dos.o] Error 1
    make[3]: Leaving directory `/DEV/dosbox/src/dos'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/DEV/dosbox/src'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/DEV/dosbox'
    make: *** [all] Error 2

    and src dosbox/include/callback.h...
    #ifndef DOSBOX_CALLBACK_H
    #define DOSBOX_CALLBACK_H

    #ifndef DOSBOX_MEM_H
    #include "mem.h"
    #endif

    typedef Bitu (*CallBack_Handler)(void);
    extern CallBack_Handler CallBack_Handlers[];
    enum { CB_RETN,CB_RETF,CB_IRET,CB_IRETD,CB_IRET_STI,CB_IRET_EOI_PIC1,
    CB_IRQ0,CB_IRQ1,CB_IRQ9,CB_IRQ12,CB_IRQ12_RET,CB_IRQ6_PCJR,
    CB_INT29,CB_INT16,CB_HOOKABLE,CB_TDE_IRET,CB_IPXESR,CB_IPXESR_RET };

    #define CB_MAX 128
    #define CB_SIZE 32
    #define CB_SEG 0xF100
    enum { CBRET_NONE=0,CBRET_STOP=1 };
    extern Bit8u lastint;

    INLINE RealPt CALLBACK_RealPointer(Bitu callback) {
    return RealMake(CB_SEG,callback*CB_SIZE);
    }
    INLINE PhysPt CALLBACK_PhysPointer(Bitu callback) {
    return PhysMake(CB_SEG,callback*CB_SIZE);
    }
    INLINE PhysPt CALLBACK_GetBase(void) {
    return CB_SEG << 4;
    }

    Bitu CALLBACK_Allocate();
    void CALLBACK_Idle(void);
    void CALLBACK_RunRealInt(Bit8u intnum);
    void CALLBACK_RunRealFar(Bit16u seg,Bit16u off);
    bool CALLBACK_Setup(Bitu callback,CallBack_Handler handler,Bitu type,const char* descr);
    Bitu CALLBACK_Setup(Bitu callback,CallBack_Handler handler,Bitu type,PhysPt addr,const char* descr);
    const char* CALLBACK_GetDescription(Bitu callback);
    bool CALLBACK_Free(Bitu callback);
    void CALLBACK_SCF(bool val);
    void CALLBACK_SZF(bool val);

    extern Bitu call_priv_io;
    class CALLBACK_HandlerObject{
    private:
    bool installed;
    Bit16u m_callback;
    enum {NONE,SETUP,SETUPAT} m_type;
    struct {
    RealPt old_vector;
    Bit8u interrupt;
    bool installed;
    } vectorhandler;
    public:
    CALLBACK_HandlerObject():installed(false),m_type(NONE){vectorhandler.installed=false;}
    ~CALLBACK_HandlerObject();
    //Install and allocate a callback.
    void Install(CallBack_Handler handler,Bitu type,const char* description);
    void Install(CallBack_Handler handler,Bitu type,PhysPt addr,const char* description);
    //Only allocate a callback number
    void Allocate(CallBack_Handler handler,const char* description=0);
    Bit16u Get_callback(){return m_callback;}
    RealPt Get_RealPointer(){ return CALLBACK_RealPointer(m_callback);}
    void Set_RealVec(Bit8u vec);
    };
    #endif

    but all is normal for me. I don't understand why I have a problem for "void Allocate(CallBack_Handler handler,const char* description=0)"...

    [ Edited by rusback on 2007/5/16 5:17 ]
    PegasosII G4 512Mo 80Go ATI RADEON 9200SE....
    Yeah! The best it's MorphOS :)
  • »16.05.07 - 03:28
    Profile Visit Website
  • MorphOS Developer
    itix
    Posts: 1520 from 2003/2/24
    From: Finland
    Quote:


    I don't understand why I have a problem for "void Allocate(CallBack_Handler handler,const char* description=0)"...



    Add -D_NO_PPCINLINE to compiler options. Allocate() is an Exec function and compiler tries to expand function declaration to full OS call.
    1 + 1 = 3 with very large values of 1
  • »16.05.07 - 05:41
    Profile
  • Fab
  • MorphOS Developer
    Fab
    Posts: 1331 from 2003/6/16
    That, or #undef Allocate, #undef Enable & co in strategic places. :)

    Rusback, i compiled dosbox 0.70 btw. I won't release tho, since like all previous releases it can deadlock sometimes. Besides, it runs need for speed of doom at 2 or 3 fps, that's really slow.

    Itix, a call to Sound_Init() (powersdl_sound) just kills the whole system btw.


    [ Edited by Fab on 2007/5/16 9:28 ]
  • »16.05.07 - 09:26
    Profile Visit Website
  • Butterfly
    Butterfly
    Posts: 62 from 2004/9/8
    From: France
    @itix & Fab: ok thanks for your help...
    PegasosII G4 512Mo 80Go ATI RADEON 9200SE....
    Yeah! The best it's MorphOS :)
  • »16.05.07 - 14:48
    Profile Visit Website