Search found 383 matches

by Miquel
Sat Nov 10, 2018 12:56 pm
Forum: SGDK
Topic: An error check in the 3 line handshake
Replies: 12
Views: 1111

Re: An error check in the 3 line handshake

(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 believes there's going to be a mouse there). Why is a bad idea to hotplug? You can hurt the ...
by Miquel
Fri Nov 09, 2018 2:46 pm
Forum: SGDK
Topic: How to debug my code?
Replies: 4
Views: 424

Re: How to debug my code?

Regen has a debugger, and is useful for following current execution. What I use as a break point is: 0: jra 0b It’s ASM code, but you can build a macro around it. Basically it blocks the cpu at this point, but you can bypass it with Regen. If this code isn’t on an exception exceptions can be execute...
by Miquel
Fri Nov 09, 2018 2:37 pm
Forum: Exodus
Topic: Active Disassembly
Replies: 1
Views: 543

Re: Active Disassembly

You are getting impossible results because there is code and data all mixed, and the plain disassembly you are using can't differentiate them, even worst can get confused between them. There are two ways: - Use a complex disassembly like IDA Pro, which allows you to emulate and/or disassembly from c...
by Miquel
Sat Nov 03, 2018 4:15 am
Forum: Megadrive/Genesis
Topic: simple 68k loop
Replies: 21
Views: 2355

Re: simple 68k loop

You can avoid using vertical exceptions by checking the vertical bit on the vdp. Also there is the STOP instruction, but without exceptions I think it will not work. Alternatively, you can use the same schema we used for the the ‘SEGA’ mark: /* code */ jra 1f .org 0x78 /* check twice if it's really ...
by Miquel
Sat Oct 27, 2018 10:32 pm
Forum: Demos
Topic: Moonrider (prototype test port)
Replies: 4
Views: 1056

Re: Moonrider (prototype test port)

Man, I was dressed as Seriousman!
What I meant was: If you have plan to do a scroll, it should be the first thing to do since it will impose modifications on everything, except, perhaps, sound and music.
by Miquel
Sat Oct 27, 2018 10:26 pm
Forum: SGDK
Topic: General SGDK questions
Replies: 14
Views: 1188

Re: General SGDK questions

If you don’t give us the definition on PAL1, there is no way of telling where is the mistake other than guessing. so I could use all palettes on a single plane What most games do is break up palettes like this: 1 pal for main characters, a few foes, the hud and perhaps things like explosions and sim...
by Miquel
Fri Oct 26, 2018 11:05 pm
Forum: Demos
Topic: Moonrider (prototype test port)
Replies: 4
Views: 1056

Re: Moonrider (prototype test port)

Interesting!
I think you should do the scroll first of all because that changes the game design quite a lot.


Have you think of improving it? for example, hiding the main character in cloaking technology? ;) Like nobody was there except for the trail it leaves.
What do you think of it?
by Miquel
Tue Oct 23, 2018 9:29 pm
Forum: Megadrive/Genesis
Topic: simple 68k loop
Replies: 21
Views: 2355

Re: simple 68k loop

readInput was just an example without real meaning, if I have understood it correctly what bioloid wants to do is set the screen to one color with the less possible file/rom size, were not talking about a typical MD program/game.
by Miquel
Sat Oct 20, 2018 9:01 pm
Forum: Megadrive/Genesis
Topic: simple 68k loop
Replies: 21
Views: 2355

Re: simple 68k loop

And to do the main loop in GCC, the one you should never exit, simply:

Code: Select all

mainLoop:
	/* more code, like for example: */
	bsr readInput
	/* more code */
	jra mainLoop
by Miquel
Wed Oct 10, 2018 10:48 am
Forum: Megadrive/Genesis
Topic: simple 68k loop
Replies: 21
Views: 2355

Re: simple 68k loop

Certain, you only need 8 very first bytes for stack and pc init, and then on address 0x100 the ascii SEGA mark. You even can use this same address to init the copy protection chip, 2 less bytes! .section .text.boot .org 0x0 dc.l 0x00000000 dc.l Reset Reset: move.w #0x2700, sr /* disable exceptions *...
by Miquel
Tue Oct 09, 2018 7:34 pm
Forum: Megadrive/Genesis
Topic: Gunstar Heroes Decompression - Format & C# code
Replies: 5
Views: 762

Re: Gunstar Heroes Decompression - Format & C# code

Do you know what other kind of work this background processing can do?
If is able to stop/resume probably means there is a more priority background work to do, interesting to know what is.
by Miquel
Tue Oct 09, 2018 7:25 pm
Forum: Megadrive/Genesis
Topic: simple 68k loop
Replies: 21
Views: 2355

Re: simple 68k loop

Sik, you can always use repeat, like: .rept 16 move.l d0, (a1)+ .endr bioloid, if you don’t use exceptions for sure you can get rid of most of the vector table. And most of the header too except of the ‘SEGA’ mark. But yeah that’s kind of unorthodox. If you are going for that kind of minimalism, abs...
by Miquel
Tue Oct 09, 2018 2:08 am
Forum: Megadrive/Genesis
Topic: Gunstar Heroes Decompression - Format & C# code
Replies: 5
Views: 762

Re: Gunstar Heroes Decompression - Format & C# code

It seems to use this one format a lot, mostly for background pattern loading. [...] The other neat thing about it is that it doesn't seem to have any restrictions on length and just operates on a bit stream. GH seems to let it decode a pattern at a time and then send that to VRAM, and the decompres...
by Miquel
Tue Sep 25, 2018 7:06 pm
Forum: Megadrive/Genesis
Topic: 68k edge case: btst dN,#immed
Replies: 11
Views: 1432

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

My question was raised by the consideration that if you try to compare this two instructions: a) btst.b d0, #0 b) btst.b d0, 0 in terms of functionality, A seems to be a subset of B. Meaning all microcode of A is included on B *. After some thinking, it’s clear that at least one microinstruction of ...
by Miquel
Tue Sep 25, 2018 2:00 am
Forum: Megadrive/Genesis
Topic: 68k edge case: btst dN,#immed
Replies: 11
Views: 1432

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

Then if the compiler works that way: btst d?, #imm <- WORKS btst .l d?, #imm <- WORKS btst .b d?, #imm <- FAILS The assembler is wrong: the last two lines should be swapped in terms of work/fail. What the assembler should accept, if anything, is: btst.l dN,dM btst.b dN,<ea> btst.l #immed,dN btst.b ...