Search found 716 matches

by Sik
Thu Nov 15, 2018 9:04 pm
Forum: Megadrive/Genesis
Topic: Looping access from 68K and Z80
Replies: 3
Views: 97

Re: Looping access from 68K and Z80

You sure? YM2612 is on $A04000+ because it's accessed through the Z80 bus (where it's at $4000+). It seems $A0xxxx is a gate to the whole Z80 bus area. It's generally acknowledged that any sort of loop (68000-to-Z80-to-68000 bus) is bound to result in a hang up, but yeah I don't think the exact mech...
by Sik
Thu Nov 15, 2018 8:12 pm
Forum: Hardware
Topic: Controllers and wrong I/O pin directions
Replies: 4
Views: 90

Re: Controllers and wrong I/O pin directions

Except that only works for Sega's own peripherals and not any of the third party ones. EA multitap is detected by meddling with port 2 and seeing what shows up in port 1, Miracle Piano keyboard is detected by configuring the I/O pins for the piano, sending a MIDI command and wait to see if it sends ...
by Sik
Tue Nov 13, 2018 5:09 am
Forum: SGDK
Topic: An error check in the 3 line handshake
Replies: 12
Views: 327

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: 4
Views: 90

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: 327

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: 327

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: 327

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: 1423

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: 1423

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: 373

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: 910

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: 484

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: 4509

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: 879

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: 879

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...