Giter Site home page Giter Site logo

gameboy_ghidrasleigh's People

Contributors

cturt avatar frozenlake avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gameboy_ghidrasleigh's Issues

Some minor issues with opcodes.

Hey, I was going over a disassembly of Pokemon TCG, and noticed that a few of the opcodes were... somewhat off. I'll go ahead and list the ones I managed to find.

0xD9: Missing "RETI" instruction
0xE8: Uses one more byte than it should.
0xF8: Uses one more byte than it should.

Error importing file

Hey, cool project!

I get an error trying to use it though, not sure if I'm doing something wrong.

Created new project -> File -> Import File -> pick any GB rom, get error below:

Error importing file: Tetris.gb
ghidra.program.model.lang.CompilerSpecNotFoundException: Exception reading GameBoy:LE:16:default/default(GameBoy.cspec): unexpected attribute "baseinsize"
	at ghidra.program.model.lang.BasicCompilerSpec.<init>(BasicCompilerSpec.java:145)
	at ghidra.app.plugin.processors.sleigh.SleighLanguage.getCompilerSpecByID(SleighLanguage.java:1093)
	at ghidra.app.util.opinion.BinaryLoader.loadProgram(BinaryLoader.java:276)
	at ghidra.app.util.opinion.AbstractProgramLoader.load(AbstractProgramLoader.java:112)
	at ghidra.plugin.importer.ImporterUtilities.importSingleFile(ImporterUtilities.java:401)
	at ghidra.plugin.importer.ImporterDialog.lambda$okCallback$7(ImporterDialog.java:351)
	at ghidra.util.task.TaskLauncher$1.run(TaskLauncher.java:90)
	at ghidra.util.task.Task.monitoredRun(Task.java:126)
	at ghidra.util.task.TaskRunner.lambda$startTaskThread$1(TaskRunner.java:94)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: com.sun.msv.verifier.ValidityViolation; lineNumber: 12; columnNumber: 91; unexpected attribute "baseinsize"
	at com.sun.msv.verifier.Verifier.onError(Verifier.java:367)
	at com.sun.msv.verifier.Verifier.onError(Verifier.java:363)
	at com.sun.msv.verifier.Verifier.feedAttribute(Verifier.java:294)
	at com.sun.msv.verifier.Verifier.startElement(Verifier.java:221)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:510)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2710)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:534)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1216)
	at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:635)
	at org.iso_relax.verifier.impl.VerifierImpl.verify(VerifierImpl.java:121)
	at ghidra.app.plugin.processors.sleigh.SleighLanguageValidator.validateSleighFile(SleighLanguageValidator.java:103)
	at ghidra.app.plugin.processors.sleigh.SleighLanguageValidator.validateCspecFile(SleighLanguageValidator.java:81)
	at ghidra.program.model.lang.BasicCompilerSpec.<init>(BasicCompilerSpec.java:109)
	... 11 more

---------------------------------------------------
Build Date: 2019-Dec-18 1306 EST
Ghidra Version: 9.1.1
Java Home: D:\Program Files\Amazon Corretto\jdk11.0.6_10
JVM Version: Amazon.com Inc. 11.0.6
OS: Windows 7 6.1 amd64

Opcodes e0 and f0 fail when pointing at ff00.

That is to say, in the cases of "e0 00" and "f0 00", the parser treats it as "LD (0xFF00 + (0x0)),A" and "LD A,(0xFF00 + (0x0))", instead of going to (DAT_io_0000). If this could be fixed, possibly around the same time as removing the IO pointers for LDH operations, that would be wonderful.

Three Feature requests.

So, I have three basic feature requests to improve this a great deal, though they can be grouped together.

  1. Adjust handling of LDH instruction to point at ram:FFxx instead of io:00xx, since sometimes games will mix in regular LD instructions to that area.

  2. Change autodetected writes to the 0000-7fff range to aim at io, instead of ram. This prevents autodetection from inserting useless references to those sections, because of commands to the MBC.

  3. Implement some method of Bank switching, preferably using the writes to io to trigger this, being able to configure different modes for that, due to how different Memory Bank Controllers handle things. Honestly, I have no idea how to go about this, but this is essentially the golden grail. If you want to completely disassemble anything other than Tetris, you need some sort of method to deal with banks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.