Search found 292 matches

by Miquel
Mon Jul 16, 2018 11:44 am
Forum: Cartridge
Topic: Size limits
Replies: 11
Views: 160

Re: Size limits

If you develop your own bank switching there is no limit of size other than what technology provides. And you can use any type of storage as long as the worst case scenario in read response is smaller than a read cycle on the 68K. In the case of SD+FAT you will need a quite big fpga-like chip, not t...
by Miquel
Sun Jul 15, 2018 2:17 pm
Forum: Demos
Topic: Mega Man X
Replies: 9
Views: 489

Re: Mega Man X

Wow! it really feels like a finished product, I hope you make it through completely.
I like very much seeing word addressing for variables.

Have you used original code as a basis? Learn much that way?

Thinking of using it as a basis for an original game?
by Miquel
Mon Jul 09, 2018 5:43 am
Forum: Megadrive/Genesis
Topic: 68000 programming optimization tips? (for speed)
Replies: 21
Views: 2247

Re: 68000 programming optimization tips? (for speed)

Sik wrote:
Thu Apr 20, 2017 9:50 pm
These days I'm exploiting Scc a lot for quickly getting 0/1 values from a condition (Scc followed by AND). Or just outright 0/-1 (no AND) if I just want a boolean to be used later.
Or just do a: "neg.b" to get the appropriate value.

Hard to remember all those 68k tricks ;)
by Miquel
Tue Jul 03, 2018 12:09 pm
Forum: SGDK
Topic: dealing with matrices (arrays)
Replies: 22
Views: 543

Re: dealing with matrices (arrays)

About that matrix: - You definitely want the first dimension of the matrix to be a 2^n number, like: map[?][32] to avoid divisions and such. - Probably the contiguous space better be the columns, this way you can have variable width (works because for the looks of it you only do x-axis scroll). If y...
by Miquel
Wed Jun 20, 2018 5:03 pm
Forum: Video Display Processor
Topic: How h interrupt register works?
Replies: 7
Views: 714

Re: How h interrupt register works?

The issue is the countdown "internal register" gets update before any horitzontal exception instruction has the change to be executed. Yes, going two steeps ahead works but involves doing more cases/code, and what I was trying to do is self-changing code to be really fast, an then it must be placed ...
by Miquel
Tue Jun 19, 2018 12:01 am
Forum: SGDK
Topic: Pixel,circle,square and line draw
Replies: 8
Views: 364

Re: Pixel,circle,square and line draw

There's a game (forgot the name now) that multiplexes two sprites across the screen and uses them to do snow (the multiplexing is needed to avoid hogging the whole sprite table with snow sprites). And do you know how they did it ? Perhaps using h-blank time to change x and y of sprites.. or maybe c...
by Miquel
Mon Jun 18, 2018 8:46 pm
Forum: SGDK
Topic: Pixel,circle,square and line draw
Replies: 8
Views: 364

Re: Pixel,circle,square and line draw

On a bitmap device (like a traditional PC) drawing lines and circles it's a very easy/basic arithmetic operation probably convenient for starters, but no on tile devices like MD. I also recently pondered this functionality for my game and I can tell you the drawbacks of bitmap 'mode' on MD are: - It...
by Miquel
Sat Jun 16, 2018 12:59 pm
Forum: SGDK
Topic: Pixel,circle,square and line draw
Replies: 8
Views: 364

Re: Pixel,circle,square and line draw

Or just draw circles and lines through tiles (sprites or planes) were Geny excels on. MD hardware wasn't designed to draw using bitmaps, Stef simulated it but with a performance penalty.
by Miquel
Sat Jun 16, 2018 12:20 pm
Forum: Video Display Processor
Topic: disable video on vblank, better?
Replies: 7
Views: 416

Re: disable video on vblank, better?

If you do only that kind of DMAs though (entirely possible for most games actually!) then it's indeed a better option to unroll the loop . Loop unrolled, but no two queues thankfully: 0: addq.w #1, g_framesLost rte ROUTINE ExceptionVideoVerticalBlank * Check if frame is ended btst.b #gameStateNotRe...
by Miquel
Tue Jun 12, 2018 11:45 am
Forum: Video Display Processor
Topic: How h interrupt register works?
Replies: 7
Views: 714

Re: How h interrupt register works?

I just tried to disconnect display while dma'ing and works MUCH better, on real hardware I only see artefacts with sprites on a very precise line (on the top of the D), and not at all with planes.

Alien Noise (clearer than before).zip
(8.49 KiB) Downloaded 9 times
by Miquel
Sun Jun 10, 2018 9:33 am
Forum: Video Display Processor
Topic: How h interrupt register works?
Replies: 7
Views: 714

Re: How h interrupt register works?

Quite bothering indeed. That's the best explanation I have found so far: The VDP has a counter that is decremented on every line. When the counter has expired, and if bit 4 (IE1) of register #0 is set, then a level 4 interrupt will occur. The counter is loaded with the contents of register #10 in th...
by Miquel
Sat Jun 09, 2018 5:54 pm
Forum: Video Display Processor
Topic: How h interrupt register works?
Replies: 7
Views: 714

How h interrupt register works?

How "h interrupt register" reg #10 really works? I'm trying to modify it's value inside a horizontal exception to fire again in X raster lines more and it seems to completely ignore the value, instead fires again at the previous value, but strangely enough half screen later takes my value into accou...
by Miquel
Thu Jun 07, 2018 4:25 pm
Forum: Video Display Processor
Topic: disable video on vblank, better?
Replies: 7
Views: 416

Re: disable video on vblank, better?

As you say, this code not only does dma operations but also any other video operation, like setting register 0, 1, plane addresses, window position,... anything except for: - Some operations directly related to horizontal-interrupts, which must be done on spot - Fill and vpd copy dma operations, whi...
by Miquel
Thu Jun 07, 2018 11:20 am
Forum: Video Display Processor
Topic: disable video on vblank, better?
Replies: 7
Views: 416

Re: disable video on vblank, better?

I guess your small loop is to set the DMA registers right ? In this case why not just enroll the loop as the number of register to set is fixed. Yes, while in the vert-except all it does is set vdp registers, but it's length it's not fixed, it depends completely on the frame. In regular code when I...