Closed bradenbest closed 6 years ago
Yes, because I don't even started coding it :smile:
Naive approach: I tried going gung-ho style and writing my own main.cpp
:
#include "geardrive_core.h"
int main(void){
GeardriveCore gdc;
gdc.LoadROM("./sonic.bin");
}
And then...
$ ./a.out
1: Loading ./sonic.bin...
Segmentation fault
@drhelius You can't close an issue that isn't resolved. Your project clearly has issues and even bugs, as can be seen where it invokes undefined behavior and crashes, evidently from trying to read 8 bytes from a null pointer.
$ valgrind ./a.out
==20137== Memcheck, a memory error detector
==20137== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==20137== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==20137== Command: ./a.out
==20137==
==20137== Invalid read of size 8
==20137== at 0x412D98: Cartridge::Reset() (in /home/braden/Games/genesis/Geardrive/src/a.out)
==20137== by 0x413384: Cartridge::LoadFromFile(char const*) (in /home/braden/Games/genesis/Geardrive/src/a.out)
==20137== by 0x41458E: GeardriveCore::LoadROM(char const*) (in /home/braden/Games/genesis/Geardrive/src/a.out)
==20137== by 0x4149B0: main (in /home/braden/Games/genesis/Geardrive/src/a.out)
==20137== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==20137==
==20137==
==20137== Process terminating with default action of signal 11 (SIGSEGV)
==20137== Access not within mapped region at address 0x0
==20137== at 0x412D98: Cartridge::Reset() (in /home/braden/Games/genesis/Geardrive/src/a.out)
==20137== by 0x413384: Cartridge::LoadFromFile(char const*) (in /home/braden/Games/genesis/Geardrive/src/a.out)
==20137== by 0x41458E: GeardriveCore::LoadROM(char const*) (in /home/braden/Games/genesis/Geardrive/src/a.out)
==20137== by 0x4149B0: main (in /home/braden/Games/genesis/Geardrive/src/a.out)
==20137== If you believe this happened as a result of a stack
==20137== overflow in your program's main thread (unlikely but
==20137== possible), you can try to increase the size of the
==20137== main thread stack using the --main-stacksize= flag.
==20137== The main thread stack size used in this run was 8388608.
1: Loading ./sonic.bin...
==20137==
==20137== HEAP SUMMARY:
==20137== in use at exit: 72,704 bytes in 1 blocks
==20137== total heap usage: 2 allocs, 1 frees, 76,800 bytes allocated
==20137==
==20137== LEAK SUMMARY:
==20137== definitely lost: 0 bytes in 0 blocks
==20137== indirectly lost: 0 bytes in 0 blocks
==20137== possibly lost: 0 bytes in 0 blocks
==20137== still reachable: 72,704 bytes in 1 blocks
==20137== suppressed: 0 bytes in 0 blocks
==20137== Rerun with --leak-check=full to see details of leaked memory
==20137==
==20137== For counts of detected and suppressed errors, rerun with: -v
==20137== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
The fact that you closed this legitimate issue saying that you haven't "started coding it", and that the last update was made 4 years ago, tells me that this project is abandoned.
If this isn't abandoned, you need to reopen this issue. If it is, you need to be honest and say that in the README.
Sorry but it's not going to work, the only finished part is the z80 core, I started coding the 68k core but then paused and focused on NES emulation. I'll try to return to Genesis / MD any time soon.
@drhelius If you really mean that, you should re-open this issue, and only close it when you at least have a makefile or some basic build system that results in a functional program.
There is no build system and there is no makefile in
src/
. Attempting to manually compile the files insrc/
andplatforms/qt-shared
reveals many issues.video.cpp
miscapitalizesvideo.h
asVideo.h
, resulting in the compiler being unable to find it. I had to make a symlink to help it along.After getting the files to compile into objects, I am unable to link them, as there seems to be no file in the directory containing a
main()
. Where is the entry point?So I try going to
platforms/qt-shared
and compiling those.All of the files have some fatal error that prevents them from compiling. There are several files and even entire directories that are inexplicably missing from the project.