Search found 2850 matches

by Chilly Willy
Mon Jun 22, 2020 1:06 pm
Forum: Megadrive/Genesis
Topic: Most compatible way to jump to game image on hardware - making my own cart
Replies: 21
Views: 639

Re: Most compatible way to jump to game image on hardware - making my own cart

Well, at least by having the code written to flash, you don't have the problem of games that write over top of the rom area to crash early versions of rom-backup systems and emulators. I've posted a number of patch files over at Sega-16 that cure the startup problems with a few different games that ...
by Chilly Willy
Sun Jun 07, 2020 12:49 pm
Forum: Sound
Topic: Sega CD Mode 1 support functions for SGDK
Replies: 22
Views: 6502

Re: Sega CD Mode 1 support functions for SGDK

Good to hear. I'll have to remember to make that change in my own stuff. That was a good point - while leaving the CD constantly checking probably doesn't hurt anything, it's better to just shut things down after a while. A menu option in case the user changes their mind later is probably also a goo...
by Chilly Willy
Fri Jun 05, 2020 7:27 pm
Forum: Sound
Topic: Sega CD Mode 1 support functions for SGDK
Replies: 22
Views: 6502

Re: Sega CD Mode 1 support functions for SGDK

EDIT: well, i realize MegaCD led keeps blinking when it is switched on and no cd. It is a bad thing having a MD game with Mode 1 feature, but if you do not put a disc on the CD unit you will have a led blinking for hours... Is there a way to say to the Mega CD to stop detecting CD, or switch off th...
by Chilly Willy
Thu Jun 04, 2020 7:08 pm
Forum: Sound
Topic: Sega CD Mode 1 support functions for SGDK
Replies: 22
Views: 6502

Re: Sega CD Mode 1 support functions for SGDK

Emulators generally don't handle things like Mode 1 since it wasn't used by anything commercial, so it was of no interest to emulator authors. It's like CD32X emulation - not something emulations handle. This is more a real hardware thing.
by Chilly Willy
Sun May 31, 2020 12:16 am
Forum: Sound
Topic: Sega CD Mode 1 support functions for SGDK
Replies: 22
Views: 6502

Re: Sega CD Mode 1 support functions for SGDK

There's a table of vectors in the MD ram for CD related stuff, and you need to alter that if you want to use MD ints AND also keep the CD going. One of the things the CD NEEDS is the level 2 int bumped from the MD side periodically. So in the MD vertical blank, I generate a level 2 int to the CD. Th...
by Chilly Willy
Fri May 29, 2020 12:24 pm
Forum: Sound
Topic: Sega CD Mode 1 support functions for SGDK
Replies: 22
Views: 6502

Re: Sega CD Mode 1 support functions for SGDK

You screwed up some of the conversion into C. Look at the original here write_byte(0xA1200E, 0x00); // clear main comm port write_byte(0xA12002, 0x2A); // write-protect up to 0x05400 write_byte(0xA12001, 0x01); // clear bus request, deassert reset - allow CD Sub-CPU to run and now look at your conve...
by Chilly Willy
Thu May 28, 2020 10:22 pm
Forum: Megadrive/Genesis
Topic: Alternative to Vasm assembler?
Replies: 27
Views: 2589

Re: Alternative to Vasm assembler?

Asmx use @whatever or .whatever for local labels. They're usable until you pass a non-local label. This is pretty standard for many assemblers. So it's like this

Code: Select all

first_label:
    code
    more code
.1
    even more code
.2
    check something
    bmi.b .1
    bne.b .2
    rts

next_label:
by Chilly Willy
Sat May 09, 2020 9:11 pm
Forum: Announcement
Topic: Spritesmind is back
Replies: 3
Views: 1164

Re: Spritesmind is back

Nice to see the site still going strong. A lot of sites have basically given in to the spammers.
by Chilly Willy
Tue May 05, 2020 8:44 pm
Forum: Megadrive/Genesis
Topic: Alternative to Vasm assembler?
Replies: 27
Views: 2589

Re: Alternative to Vasm assembler?

Well, the code is really straightforward, and the bug was pretty easy to spot. Took me maybe two minutes to figure it out. :lol:
by Chilly Willy
Mon May 04, 2020 8:19 pm
Forum: Megadrive/Genesis
Topic: Alternative to Vasm assembler?
Replies: 27
Views: 2589

Re: Alternative to Vasm assembler?

It's a bug in o_Shift in asm68k.c.

Code: Select all

                reg1 = GetReg(data_regs);
                if (reg1 >= 0)
There's no else part that throws an error on the register not being found from the list passed.
by Chilly Willy
Mon May 04, 2020 3:12 pm
Forum: Megadrive/Genesis
Topic: Alternative to Vasm assembler?
Replies: 27
Views: 2589

Re: Alternative to Vasm assembler?

Make sure to enable errors. For some reason asmx has error reporting disabled by default… (why is that even a setting?!) Yeah, I can see making ignore WARNINGS default, but not errors. That's just crazy! :lol: Might be because the guy who originally wrote it used to assembler batches of files and h...
by Chilly Willy
Thu Apr 30, 2020 2:31 pm
Forum: SGDK
Topic: SRAM read / write
Replies: 27
Views: 5276

Re: SRAM read / write

Using multiple variables for offsets is a bit wasteful, as is making them all u32. :D But if you have ram to burn, it's not a big deal. Another thing to remember is that if your rom is >2MB in size, enabling the save ram kills any rom above 2MB until it's disabled. Never put save ram code in the upp...
by Chilly Willy
Tue Apr 28, 2020 1:22 pm
Forum: SGDK
Topic: SRAM read / write
Replies: 27
Views: 5276

Re: SRAM read / write

I think I figured out. I made the first offset 0x0000, then the next.one should be +256, as I saw that 1 byte is like 256. So I also may learnt that 1 byte = 1 u8 variable. As I see sik wrote that F in the 0x7FFF kind of number, it should be base 16. Totally wrong. A u8 variable is an unsigned byte...
by Chilly Willy
Fri Apr 24, 2020 12:02 pm
Forum: Megadrive/Genesis
Topic: Alternative to Vasm assembler?
Replies: 27
Views: 2589

Re: Alternative to Vasm assembler?

It doesn't require using .S, but if you don't, you'll have to invoke the preprocessor manually from the makefile. It's easier to just use the .S extension and then go to town with #define and whatnot. That's what the .S does - signal gcc that it should automatically invoke the preprocessor before in...
by Chilly Willy
Thu Apr 23, 2020 6:30 pm
Forum: Megadrive/Genesis
Topic: Alternative to Vasm assembler?
Replies: 27
Views: 2589

Re: Alternative to Vasm assembler?

Very true - the C preprocessor can be run on gas files (use .S instead of .s for automatically doing so). Pragmas and defines and stuff can be used. This does make a gas assembler specific file very flexible compared to more traditional assemblers.