Commit Graph

12 Commits

Author SHA1 Message Date
brandman211 610acf6ad6 -Made MVI@ and ADD@ follow the stack and immediate mode rules for incrementing / decrementing the SP / PC.
-Disabled Intellicart hook for ReadMemory, which seemed to be interfering.
-Implemented MVO@.
-Several instructions are now executed in succession until it hits the unimplemented "XORR R5, R5".

I should probably refactor Disassemble and Execute to label registers as source / destination to avoid further confusion at some point. My disassembly might have the source / destination registers flipped as well.
2012-07-20 07:22:41 +00:00
brandman211 e73c48219a -Loaded EROM / GROM.
-Fixed disassembly for JMP:
--Now it uses the parameter pc, not RegisterPC.
--I was loading both the second and third value from the second's address.
--Casting the calculated addresses to bytes when addresses are 16-bit was a bad idea.
--Removed a closing parenthesis I accidentally stuck in the formatting.

It seems that I've gotten far enough to use the Executive ROM as a test case! Now to go instruction by instruction and see if they work as planned and hope this will all eventually make something.
2012-07-19 00:05:08 +00:00
brandman211 198c60af88 -Refactored ReadMemory so that both the core and cart addresses are read.
--Afterwards, the data is reconciled, right now by chucking out the core value if the cart responded.
-WriteMemory now writes to both the core and the cart unconditionally.
--Each case now breaks out of the switch statement in case we want to do more complex things at the end of the function later on.
-All default paths in both functions now throw an exception.
2012-07-18 06:19:03 +00:00
brandman211 1ee1d03aea -Parsed / implemented fine addresses for the Intellicart.
-Implemented the final CRC check.

I didn't get around to implementing bank-switched ranges, but I don't think it's worth worrying about that right now considering that the Intellicart is not marked as readable at the initial PC, so something is either wrong or I need to implement more things before this will work. I think I'll put Intellicarts on hold and try to get a .int / .bin to run in the meantime.
2012-07-18 05:35:10 +00:00
brandman211 0a3a392285 -Attempted to parse out memory attributes.
--In my test case, only a few segments were set to readable and nothing else was set. 0x1000, which is where the PC is initialized to, certainly isn't in a writable page.
--Although I've read that these memory attributes affect the Intellivision and not the Intellicart, I'm pretty sure this has to be implemented in the Intellicart so that my Read/WriteCart functions can choose to respond / not respond depending on these attributes. I very well could be wrong.
-Hooked Read/WriteCart into Read/WriteMemory.
-Implemented memory attributes into Read/WriteCart.
--TODO: Bank-switching.

TODO: Fine address table and memory attribute / fine address checksums.
2012-07-17 05:32:00 +00:00
brandman211 cd5458a5e4 Fixed CRC. Passes! 2012-07-17 04:16:11 +00:00
brandman211 21558eaf11 -Made ReadMemory and WriteMemory for the Intellicart Read/WriteCart and made them return nullable values instead of passing an out value.
-Started parsing data segments.
--CRC check fails. :(
-Added .bin and .rom to the Intellivision associated file extensions in the load ROM dialog.
2012-07-16 05:52:01 +00:00
brandman211 4f9539b73c -Made Executive ROM and Graphics ROM read-only. I still haven't made the memory map accessibility limited by the VBlank Period, but I'm assuming that should come way later.
-Initialized the memory devices with a tentative size that ignores the unofficial ranges.
-Masked addresses to match those sizes (That's my understanding of what the memory map needs to do based on other examples).
-Added the ICart interface.
-Started the Intellicart parser; got far enough to know that the files I'm working with are not Intellicarts. ^_^
2012-07-15 08:38:50 +00:00
brandman211 32baa013af -Made the memory map use ushort arrays because the Intellivision is 16-bit.
-Fixed JMP disassembly; I need to return on an invalid opcode because I was breaking out of the inner switch statement, not both that and the outer one.
2012-07-09 23:19:57 +00:00
brandman211 f3ce111c48 Checked in memory map...I need to stop programming and start sleeping. 2012-07-09 19:41:49 +00:00
brandman211 104511c5b7 -Intellivision.cs' constructor initializes the PC to 0x1000.
-Set up the "official" memory map - see http://wiki.intellivision.us/index.php?title=Memory_Map
--Things I didn't do:
---Accessibility.
---Additional Occupied Memory Ranges.
---Addresses Available to Cartridges
---Initialize any of the byte arrays.
--Not sure which of these I need to do, but clearly the byte arrays have to be initialized somewhere to something and there's a lot of gaps in this memory map.
2012-07-09 05:29:45 +00:00
beirich 36ba018ae0 basic wire-up of Intellivision core 2012-07-08 04:20:53 +00:00