Search found 714 matches

by Sik
Tue Nov 13, 2018 5:09 am
Forum: SGDK
Topic: An error check in the 3 line handshake
Replies: 12
Views: 258

Re: An error check in the 3 line handshake

Gonna continue that discussion here to avoid more derailing:
viewtopic.php?f=13&t=2936
by Sik
Tue Nov 13, 2018 5:08 am
Forum: Hardware
Topic: Controllers and wrong I/O pin directions
Replies: 0
Views: 33

Controllers and wrong I/O pin directions

Continuing from these posts: http://gendev.spritesmind.net/forum/viewtopic.php?p=34165#p34163 Pins on the controller port can be both inputs and outputs and some devices expect the direction to be set different from what a normal controller configuration uses. If two outputs get connected together y...
by Sik
Mon Nov 12, 2018 4:06 pm
Forum: SGDK
Topic: An error check in the 3 line handshake
Replies: 12
Views: 258

Re: An error check in the 3 line handshake

Pins on the controller port can be both inputs and outputs and some devices expect the direction to be set different from what a normal controller configuration uses. If two outputs get connected together you will have one or both sides getting damaged sooner or later. Reminds me, apparently the 3-...
by Sik
Sat Nov 10, 2018 2:39 pm
Forum: SGDK
Topic: An error check in the 3 line handshake
Replies: 12
Views: 258

Re: An error check in the 3 line handshake

Yes, the risk of harming the hardware is the issue. Some plugs are made so that GND gets connected first but the Mega Drive's plug is not one of those. Worse yet, the shape of the plug makes the pins wear out easily if you're constantly plugging and unplugging (probably a bigger problem, even!). Min...
by Sik
Thu Nov 08, 2018 3:46 am
Forum: SGDK
Topic: An error check in the 3 line handshake
Replies: 12
Views: 258

Re: An error check in the 3 line handshake

Doing the check only when you set the support flags means it won't work with hotplugging (I know, it's a bad idea to hotplug in the first place, but it's doable and people will keep doing it…). You really want to do the check every time it goes look at the peripheral (or at least, whenever SGDK beli...
by Sik
Thu Oct 11, 2018 8:37 am
Forum: Megadrive/Genesis
Topic: simple 68k loop
Replies: 21
Views: 1389

Re: simple 68k loop

and this one doesnt save bytes, it looks like it's unrolled at build time .rept 62 dc.l _INT .endr But that's precisely what you want (there are 64 vectors, two of those are reset and entry point, the rest are interrupts). But yeah, that's pretty much the same thing dcb would do. Anyway, there's wh...
by Sik
Tue Oct 09, 2018 7:03 pm
Forum: Megadrive/Genesis
Topic: simple 68k loop
Replies: 21
Views: 1389

Re: simple 68k loop

All this thread and not a single person mentioned dcb.l? (which is basically dc.l in repeat) This is the same thing as 62 dc.l _INT in a row: dcb.l 62, _INT ...although I admit I'm not sure if GAS supports it, given how it loves to ignore established syntax (even if it doesn't, pretty sure it must h...
by Sik
Mon Oct 01, 2018 4:26 pm
Forum: Megadrive/Genesis
Topic: IO access differences in MD mode vs SMS
Replies: 4
Views: 364

Re: IO access differences in MD mode vs SMS

Yeah, I/O port accesses don't do anything. The memory map is completely changed between MD and SMS modes (Z80 outright uses the 68000 bus in SMS mode, that should give a good idea of how heavily it changes - I assume this is so mappers can see accesses to their registers?). Also if I recall correctl...
by Sik
Tue Sep 25, 2018 2:34 am
Forum: Megadrive/Genesis
Topic: 68k edge case: btst dN,#immed
Replies: 11
Views: 884

Re: 68k edge case: btst dN,#immed

How many instructions accept immediate as destination? Admittedly I'm just as clueless, but I wouldn't be surprised if that turns out to play a factor into it.
by Sik
Tue Sep 18, 2018 4:33 pm
Forum: Megadrive/Genesis
Topic: Neat programming trick for optional operations
Replies: 3
Views: 476

Re: Neat programming trick for optional operations

Yep, ADD D0, D0 pushes the high bit of D0 into carry flag, which then can be checked with a branch. If you know the next bit to check is on the MSB and don't mind modifying the value it's faster than doing BTST (ADD.W is 4 cycles, BTST is 8 off the top of my head). The trick is normally used when re...
by Sik
Tue Sep 18, 2018 3:00 pm
Forum: Controls
Topic: Mega Mouse Usage
Replies: 23
Views: 4453

Re: Mega Mouse Usage

The drift issue would still happen without the hacked resolution (you can get the mouse to report a large enough motion to trigger the bug).
by Sik
Sun Sep 16, 2018 4:06 pm
Forum: Sound
Topic: Regarding the YM3438 on the Mega Drive...
Replies: 11
Views: 851

Re: Regarding the YM3438 on the Mega Drive...

Apparently, just like on YM2612 reads on any of the four possible addresses result on the status register so while the datasheet mentions you should only read the status with A0 = 0 and A1 = 0, they actually don't matter. Not in the version that got integrated into the ASIC in later Mega Drive mode...
by Sik
Sun Sep 16, 2018 1:11 am
Forum: Sound
Topic: Regarding the YM3438 on the Mega Drive...
Replies: 11
Views: 851

Re: Regarding the YM3438 on the Mega Drive...

Spamming reads on the status register causes the YM3438 go out of whack. This is why I was getting atrocious sounds out of my YM3438 chip. The YM2612 does not care if you spam the status register with reads. Too fast writes will disturb it but reads it doesn't care. oof, not yet another detail to w...
by Sik
Wed Sep 05, 2018 4:10 am
Forum: Exodus
Topic: Exodus 2.1 release soon (Now available!)
Replies: 30
Views: 2835

Re: Exodus 2.1 release soon (Now available!)

My impression was that F-16 stuck to mode 2 for memory reasons - the framebuffer is pretty large (may not have even fit in VRAM if using mode 4), and needing to write only 25% the amount of bytes is a plus for performance. The simpler capabilities of the TMS9918 modes are actually a benefit in this ...
by Sik
Tue Sep 04, 2018 1:39 pm
Forum: Exodus
Topic: Exodus 2.1 release soon (Now available!)
Replies: 30
Views: 2835

Re: Exodus 2.1 release soon (Now available!)

MD model 3 also handles TAS properly (which is why Gargolyes hangs up - it needs TAS to fail to write), and if I recall correctly one of the goals was to emulate multiple model eventually? So TAS needs to be emulated either way. Also the reason why that game breaks is... pretty silly (1. it was mean...