dilinger Posted September 1, 2017 Share Posted September 1, 2017 Hi, Just wanted to share my debugger integration in Virtual Jaguar. Screenshot shows an example about how it looks like. Nothing can replace the real hardware but I wanted to give a try and modify the emulator. I have added the support of ELF/DWARF format because my toolchain is based on it, and such format can operate at source code level. If someone knows about QT and OpenGL integration, it can be helpful to me. Because, if I build the emulator under msys2 environement, I have a correct video output but if I build it with Visual Studio 2015, the output video remains black/empty. 7 Quote Link to comment Share on other sites More sharing options...
TXG/MNX Posted September 2, 2017 Share Posted September 2, 2017 Nice can you also display a window for DSP RISC and GPU RISC so step support Quote Link to comment Share on other sites More sharing options...
Otto1980 Posted September 2, 2017 Share Posted September 2, 2017 Can You provide us your modifications for testing? Quote Link to comment Share on other sites More sharing options...
dilinger Posted September 2, 2017 Author Share Posted September 2, 2017 Hi Nice can you also display a window for DSP RISC and GPU RISC so step support There are display for the GPU and DSP but no tracing for the moment. I add features when I feel the need or when I see "easy to do stuff". Can You provide us your modifications for testing? I can provide my current emulator version. But, you have to be aware my version need some DLLs (which I can provide), but no video output is displayed. As far, you do not need it, it won't be a big deal. In the meantime, I have included my current Release notes for people interested to know more about my modifications. vj_ReleaseNotes.txt Quote Link to comment Share on other sites More sharing options...
Zerosquare Posted September 3, 2017 Share Posted September 3, 2017 Have you contacted Shamus? Merging your work into the official VJ code would benefit a lot of people 2 Quote Link to comment Share on other sites More sharing options...
dilinger Posted September 3, 2017 Author Share Posted September 3, 2017 Have you contacted Shamus? Merging your work into the official VJ code would benefit a lot of people Thank you for your kind word. I have been in touch with Shamus in the middle of 2016. I told him I was going to add the support of the ELF format. After that, I slowly added features but forgot to keep him updated. I have tried to be very low intrusive in the original source code (such as finding the best hooks to insert my calls stuff), and created specific sources codes for most of the new windows / features. In theory, the integration should be smooth. 2 Quote Link to comment Share on other sites More sharing options...
rocky1138 Posted September 3, 2017 Share Posted September 3, 2017 Very cool. In my spare time I've been using Virtual Jaguar to learn more about writing an emulator, assembly language, etc. I forked Virtual Jaguar and created Chocolate Virtual Jaguar with the intention of basically removing the cruft from the codebase and using it as a huge learning project essentially for myself. If you ever release the code for this, I'd love to take a look to see what you did. https://github.com/rocky1138/chocolate_virtualjaguar/tree/develop Quote Link to comment Share on other sites More sharing options...
TXG/MNX Posted September 3, 2017 Share Posted September 3, 2017 Yes release this it looks great. Quote Link to comment Share on other sites More sharing options...
dilinger Posted September 4, 2017 Author Share Posted September 4, 2017 (edited) Good evening, I have shared the Virtual Jaguar and the DLLs in my Dropbox, in case of someone wants to have a look at the debugger. I do not mind to share the source code, but I would prefer to make sure the version works properly outside my own environement. Virtual Jaguar 64bits application https://www.dropbox.com/sh/29ovai170uyidsf/AACjGpPIoHpZWxtjJBgmIE7Na?dl=0 QT5 DLLs https://www.dropbox.com/sh/jdyq3wzhzglilzn/AAC-pP1XtuagsUydb0FHHZmba?dl=0 Edited September 4, 2017 by dilinger Quote Link to comment Share on other sites More sharing options...
Otto1980 Posted September 4, 2017 Share Posted September 4, 2017 (edited) thanks for sharing, first feedback from my CMD: This application failed to start because it could not find or load the Qt platform plugin "windows".Reinstalling the application may fix this problem. is there a dll missing? i placed all dlls in same folder as the VJ fast goolge results: qwindowsd.dll ?? Edited September 4, 2017 by Otto1980 Quote Link to comment Share on other sites More sharing options...
dilinger Posted September 4, 2017 Author Share Posted September 4, 2017 (edited) I do not have missing DLLs and I do not have qwindowsd.dll either. I guess you have used my QT5 DLL package "Qt5.5.1_DLLs_x64_VS2015-Release". I will try to dig your issue and, just in case of, have you installed the QT5 binaries for Windows? I think there are packages available in QT downloads section. I have added the qwindows.dll in the QT package, feel free to check if it works. Edited September 4, 2017 by dilinger Quote Link to comment Share on other sites More sharing options...
Luigi301 Posted September 4, 2017 Share Posted September 4, 2017 (edited) I got it to work but I had to install the whole Qt development package and run virtualjaguar from the MSVC2015 Qt command prompt. edit: Well, it starts and runs my homebrew. The --debugger command line crashes the emu though. Edited September 4, 2017 by Luigi301 Quote Link to comment Share on other sites More sharing options...
dilinger Posted September 5, 2017 Author Share Posted September 5, 2017 (edited) Many thanks for your time to test it. I got it to work but I had to install the whole Qt development package and run virtualjaguar from the MSVC2015 Qt command prompt. I do not have this kind of environement requirement(s). I compiled the QT5 package for VS2015 by myself, so I guess the installation may greater differ. I'm able to make the emulator under msys2, but still needs the msys2 setup and link in the windows path. I "dream" to insert all DLLs in the executable and to be ride off of the install "mess". edit: Well, it starts and runs my homebrew. The --debugger command line crashes the emu though. Could you give me the format used by your homebrew? Have you used additional command line options? I have checked using elf and cof format executable. If you want, you can send me your homebrew executable and will check the issue. Edited September 5, 2017 by dilinger Quote Link to comment Share on other sites More sharing options...
Luigi301 Posted September 5, 2017 Share Posted September 5, 2017 Many thanks for your time to test it. I do not have this kind of environement requirement(s). I compiled the QT5 package for VS2015 by myself, so I guess the installation may greater differ. I'm able to make the emulator under msys2, but still needs the msys2 setup and link in the windows path. I "dream" to insert all DLLs in the executable and to be ride off of the install "mess". Could you give me the format used by your homebrew? Have you used additional command line options? I have checked using elf and cof format executable. If you want, you can send me your homebrew executable and will check the issue. It’s a Jaguar server executable - I’m going to say that’s the problem now that I think about it. How can I make a Jaguar ELF with VBCC? Sent from my iPhone using Tapatalk Quote Link to comment Share on other sites More sharing options...
JagChris Posted September 5, 2017 Share Posted September 5, 2017 (edited) Its a Jaguar server executable - Im going to say thats the problem now that I think about it. How can I make a Jaguar ELF with VBCC? Sent from my iPhone using Tapatalk It's been a while but I think vbcc has to be recompiled. Might be mistaken. But I don't believe so. Though Vlink can convert back and forth between a.out and elf. And probably jagserv. Edited September 5, 2017 by JagChris Quote Link to comment Share on other sites More sharing options...
JagChris Posted September 5, 2017 Share Posted September 5, 2017 Oh wait vlink is creating the Jag serve format isn't it? Just tell it not to do that and tell it to produce elf. Quote Link to comment Share on other sites More sharing options...
JagChris Posted September 5, 2017 Share Posted September 5, 2017 (edited) You'll probably want debug and all that from the compiler I see okay. It shouldn't be too hard to have your source recompile under GCC m68k elf. http://www.3do.cdinteractive.co.uk/viewtopic.php?f=35&t=3371 I think you just need -fleadingunderscore and -c, and -68000 to make sure it produces 68000 asm. And it should work pretty smooth. Sorry if I'm rambling on. Me and Tursi and Frank Wille put a lot of time into working all that out. Hope it helps. Edited September 5, 2017 by JagChris Quote Link to comment Share on other sites More sharing options...
Luigi301 Posted September 5, 2017 Share Posted September 5, 2017 I changed the vlink config to output elf32jag instead of jagsrv and it's erroring out now on the startup lib? vlink -belf32jag -t -x -minalign 1 -Bstatic -Cvbcc -nostdlib $VBCC/targets/m68k-jaguar/lib/startup.o "obj/hello.o" "obj/screen.o" "obj/cube.o" "obj/mobj.o" "obj/images.o" -s -L$VBCC/targets/m68k-jaguar/lib/ -ljag -lvc -o bin/hello.jag failed startup.o: In "startup": Error 21: startup.o (CODE+0x42): Reference to undefined symbol _BSS_END. libjag.a(debug.o): In "showoffset": Error 21: libjag.a(debug.o) (CODE+0x318): Reference to undefined symbol _BSS_END. Unfortunately the attachments don't seem to exist on that thread anymore. I have a m68k-elf-gcc but it's set up for Amiga so I'd need a Jaguar linker script. Quote Link to comment Share on other sites More sharing options...
JagChris Posted September 5, 2017 Share Posted September 5, 2017 (edited) Hmm, undefined-symbol sounds like an underscore problem. Like the names aren't matching anymore between the startup code and the main code. Check the subsequent posts in the linked to thread for ideas and just look at the names and see if you can fix it. And you really might want to consider just downloading the m68k gcc elf for Windows because a.out debug is rather primitive though Willie says that the conversion will honor any of the debug info. Edited September 5, 2017 by JagChris Quote Link to comment Share on other sites More sharing options...
JagChris Posted September 5, 2017 Share Posted September 5, 2017 And it's recommended to use -minalign 4. Quote Link to comment Share on other sites More sharing options...
Luigi301 Posted September 5, 2017 Share Posted September 5, 2017 I have the compiler but I need a Jaguar linker script. Do you have one? Sent from my iPhone using Tapatalk Quote Link to comment Share on other sites More sharing options...
JagChris Posted September 5, 2017 Share Posted September 5, 2017 Whoops. After thinking about it my logic is wrong. There's nothing to fix in the source codes. It might be something in the linker options that's adding and underscored during the link. Best guess on my part. Quote Link to comment Share on other sites More sharing options...
JagChris Posted September 5, 2017 Share Posted September 5, 2017 Yeah I think I have the Linker script at home let me get home and I'll check my sources. Quote Link to comment Share on other sites More sharing options...
JagChris Posted September 5, 2017 Share Posted September 5, 2017 jagElf linker script JagELFls.zip Quote Link to comment Share on other sites More sharing options...
toarnold Posted September 5, 2017 Share Posted September 5, 2017 @Luigi301 In case of -bjagsrv vlink uses a default linker script if nothing else is provided it looks like: SECTIONS { . = 0x4000; .text: { *(.text CODE text) } . = ALIGN(32); .data: { VBCC_CONSTRUCTORS *(.data DATA data) } . = ALIGN(32); .bss: { *(.bss BSS bss) *(COMMON) _BSS_END = ALIGN(32); } }; The _BSS_END symbol ist used by the vbcc vclib to determine free RAM for malloc/free operations. -toarnold Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.