VOGONS

Common searches


dosbox megabuild setup.cpp error

Topic actions

  • This topic is locked. You cannot reply or edit posts.

Reply 22 of 60, by easyw3

User metadata
Rank Newbie
Rank
Newbie

Hi hal ... HNY! 😀
I'm back on dosbox ...
when I launch the db app that uses the dongle I get this message
"Parallel1: BASE 378h
"TODO implement IBM-style direction switch"
can this help in debugging the strange behavior of the dongle?
I tried with ubuntu 11.10 and 10.04 lts with same results...
thank you again

Reply 23 of 60, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I can't tell if this has to do with anything, since the first attempt works.
You can create a log file by changing

#define PARALLEL_DEBUG 0
to
#define PARALLEL_DEBUG 1

in parport.h.

Does it make a difference if you disable and re-enable the port during runtime?
Like
- start DOSBox
- run your program, quit
- type parallel1 disabled on the command prompt
- type parallel1 [your config setting]
- run your program

1+1=10

Reply 24 of 60, by easyw3

User metadata
Rank Newbie
Rank
Newbie

1) compiled with
#define PARALLEL_DEBUG 1
in parport.h
2) lauched sudo dosbox
"Parallel1: BASE 378h
TODO implement IBM-style direction switch"
3) in dosbox I run the program, quit and type
"parallel1 disabled" on the command prompt
dosbox quit and on console I obtain:
"Segmentation fault"
thank you

Reply 27 of 60, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

This isn't the log I'm after.
To create these logs, please have a look at /docs/html-doc/pppatch.html "Debug Log".

but I think we should take a closer look at the segmentation fault crash:
- sudo apt-get install gdb
- gdb ./dosbox
- run
- (reproduce the crash)
GDB should respond in the console at this point. Enter backtrace in the console, post the output.

1+1=10

Reply 28 of 60, by easyw3

User metadata
Rank Newbie
Rank
Newbie

I did
- sudo apt-get install gdb (ok)
then
- sudo gdb ./dosbox (to get ownership of parallel port)
- run

then I reproduced the crash after testing dongle and invoking
'parallel1 disabled'
on gdb:
Program received signal SIGSEGV, Segmentation fault.
0x080bd173 in DOS_Device::Close (this=0xa27bb08) at dos_devicec.cpp:109
109 return Devices[devnum]->Close();
thank you again

Reply 29 of 60, by easyw3

User metadata
Rank Newbie
Rank
Newbie

Hi hal,
I also did a run with this line on conf file
parallel1=reallpt realport:/dev/parport0 dbgall
and I obtained the attached log file
(calling the program, test the dongle once
first attempt fine,
test the dongle second time
failure
exiting the app)
thank you

Attachments

  • Filename
    dosbox_001.parlog.txt
    File size
    67.66 KiB
    Downloads
    255 downloads
    File license
    Fair use/fair dealing exception

Reply 30 of 60, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Replace the file directlpt_linux.cpp with the attached one and compile again. It initializes the parallel port some more.

The log you attached shows that the dongle only outputs it data the first time. I do hope this works multiple times on a real computer?
Some data read/writes seem inconsistent, so I'm trying with explicitly setting the older parallel port operating mode.

Except for maybe fixing the crash (this is not related to this change) this is all support I can give.

Attachments

1+1=10

Reply 31 of 60, by easyw3

User metadata
Rank Newbie
Rank
Newbie

Hi hal,
I replaced the file directlpt_linux.cpp with the attached one but the result is the same... the dongle works only on the first call
(and still there is a segmentation fault if I invoke parallel1 disabled)
I attached the log file obtained from debug...
please consider that the dongle was working fluently with this app and dongle in win vista hp 32bit with Megabuild6 and porttalk...
I needed to change the pc and I got a win7 32bit but I couldn't install porttalk correctly under win7 32bit...
so I'm trying to move to linux (and I'm a real newbie in linux 😀 )
thank you again for your support!

Attachments

  • Filename
    dosbox_006.parlog.txt
    File size
    65.25 KiB
    Downloads
    248 downloads
    File license
    Fair use/fair dealing exception
  • Filename
    gdb-log.txt
    File size
    2.57 KiB
    Downloads
    301 downloads
    File license
    Fair use/fair dealing exception

Reply 33 of 60, by easyw3

User metadata
Rank Newbie
Rank
Newbie

Hi hal!!!
the dongle now works fluently with the app every time the sw calls it!!!
GREAT JOB!!! 😁
thank you very much for supporting me!!!

I attached a guide for compiling mb6 with patch for newbies 😉

thanks again 😀

Attachments

Reply 35 of 60, by easyw3

User metadata
Rank Newbie
Rank
Newbie

Hi hal,
I forgot to remember to add
#include <stddef.h>
to the .cpp files in the newbie guide to compile under ubuntu...
so I added the R1 version...
Thank you again for your great support!!! 😁

I'm really happy with my new Linux solution...
but just in case you are interested in build db for win7 with lpt support
I found that some people developed an open source driver signed for win7 64bit...
http://people.usd.edu/~schieber/psyc770/IO64.html
probably you already knew that...
anyway feel free to contact me if you need to someone to test the db under win7 64bit... 😀
Thank you a Lot again 😀

Attachments

Reply 36 of 60, by easyw3

User metadata
Rank Newbie
Rank
Newbie

Hi again,
I did a little trick to use the linux version of dosbox with parallel support under windows 7 64 bit...
I installed xubuntu 10.04 (light weight version of ubuntu) under VmWare Player + VmWare Tools + shared folders and parallel port devices connected to the VMPlayer
then I compiled db under Linux and run it in VmWare
The Megabuild works fluently in VmWare and the connection between the application in dosbox and the external PCI express ports is correctly working...
I had to adapt a bit the db conf file to obtain fullscreen under VmWare but now the solution is stable and with good performance...
(using directly Dos OS under VmWare does not allow full screen operations for the dos native application, there are no VmWare tools for dos OS)

to Hal:
did you get a chance to see the 64bit driver?
http://www.highrez.co.uk/Downloads/InpOut32/default.htm
do you think that could be integrated into DosBox Megabuild to replace porttalk in next releases?
thank you again for support 😀

Reply 38 of 60, by easyw3

User metadata
Rank Newbie
Rank
Newbie

Hi Hal,
I could try to do some porting...
do you think the internal funtions of InpOutx64:
Inp32(), Out32(), IsInpOutDriverOpen(), DlPortReadPortUchar(), DlPortWritePortUchar() could be enough to replace porttalk?
the main job for accessing parallel port in db megabuild is done in: directlpt_win32.cpp isn't it?
thank you again

Reply 39 of 60, by easyw3

User metadata
Rank Newbie
Rank
Newbie

Hi Hal!!!
we have succeeded in porting the directlpt_win32.cpp in windows 7 64bit using InpOut32 from HighRez to direct access the dongle through parallel port (pci express moschip) 😁
we did compile the prj and dosbox worked fine!!!
(in dosbox.conf I added
parallel1=reallpt realbase:e800 ecpbase:e807
parallel2=reallpt realbase:ec00 ecpbase:ec07
to access the LPTs)

So now it is possible to direct access parallel port through dosbox megabuild for old dos programs also in windows 64bit os!!!

I attached the only source file changed in dosbox megabuild 6 visual c project that we have changed
The project only needs these two other files:
inpout32.dll, inpoutx64.sys from HighRez
http://www.highrez.co.uk/Downloads/InpOut32/default.htm
😁

If you have time to go through the code and if you have time please feel free to make a new megabuild to deploy so to take advantage of that in windows 7 64bit PCs...

hoping that could help someone in maintaining the old sw in dos in new pcs ...
thank you again for the great job you have done with the megabuilds... 😀

Attachments

  • Filename
    directlpt_win32.cpp
    File size
    8.87 KiB
    Downloads
    1102 downloads
    File license
    Fair use/fair dealing exception