Yet Another Tilemap and Super Scaler Demo

Ask anything your want about the 32X Mushroom programming.

Moderator: BigEvilCorporation

Tomahomae
Very interested
Posts: 54
Joined: Sat Jan 27, 2018 2:50 am
Location: Russia

Re: Yet Another Tilemap and Super Scaler Demo

Post by Tomahomae » Wed Sep 07, 2022 2:57 pm

Vic wrote:
Wed Sep 07, 2022 7:57 am
Note that if you're planning to use MD planes for drawing font glyphs, you won't be able to use them in your tilemaps.
I don't afraid it - I going to make a grafically (and, maybe, sonically) enhanced ports of my previous projects, with the same source graphics for backgrounds and sprites. The fonts binary files and palettes code will be only unchanged pieces of GFX. So, for tilemaps will be used 32X layers exclusively.

Vic
Interested
Posts: 19
Joined: Wed Nov 03, 2021 6:01 pm

Re: Yet Another Tilemap and Super Scaler Demo

Post by Vic » Thu Sep 08, 2022 11:36 am

Then indeed it'd be best to use the string drawing code from D32XR: https://github.com/viciious/d32xr/tree/master/src-md

Tomahomae
Very interested
Posts: 54
Joined: Sat Jan 27, 2018 2:50 am
Location: Russia

Re: Yet Another Tilemap and Super Scaler Demo

Post by Tomahomae » Fri Sep 09, 2022 3:57 am

Vic wrote:
Thu Sep 08, 2022 11:36 am
Then indeed it'd be best to use the string drawing code from D32XR: https://github.com/viciious/d32xr/tree/master/src-md
You mean font.s and piece of m68k_crt1.s below?

Code: Select all

| load font tile data
        move.w  #0x8F02,(a4)            /* INC = 2 */
        move.l  #0x40000000,(a4)        /* write VRAM address 0 */
        lea     font_data(pc),a0
        move.w  #0x6B*8-1,d2
7:
        move.l  (a0)+,d0                /* font fg mask */
        move.l  d0,d1
        not.l   d1                      /* font bg mask */
        andi.l  #0x11111111,d0          /* set font fg color */
        andi.l  #0x00000000,d1          /* set font bg color */
        or.l    d1,d0
        move.l  d0,(a3)                 /* set tile line */
        dbra    d2,7b

| set the default palette for text
        move.l  #0xC0000000,(a4)        /* write CRAM address 0 */
        move.l  #0x00000CCC,(a3)        /* entry 0 (black) and 1 (lt gray) BGR */
        move.l  #0xC0200000,(a4)        /* write CRAM address 32 */
        move.l  #0x000000A0,(a3)        /* entry 16 (black) BGR and 17 (green) */
        move.l  #0xC0400000,(a4)        /* write CRAM address 64 */
        move.l  #0x0000000A,(a3)        /* entry 32 (black) BGR and 33 (red) */

        move.w  #0x8174,(a4)            /* display on, vblank enabled */

        movem.l (sp)+,d2-d7/a2-a6
        rts

Vic
Interested
Posts: 19
Joined: Wed Nov 03, 2021 6:01 pm

Re: Yet Another Tilemap and Super Scaler Demo

Post by Vic » Fri Sep 09, 2022 4:05 pm

Yes, along with put_chr, xvprintf, dbug_queue, etc

Tomahomae
Very interested
Posts: 54
Joined: Sat Jan 27, 2018 2:50 am
Location: Russia

Re: Yet Another Tilemap and Super Scaler Demo

Post by Tomahomae » Sat Sep 10, 2022 3:52 am

Let's say, my font binary files attached below. Here is a palette data:

Code: Select all

$000,$EEE,$000,$EA0,$46C,$04E,$EEE,$EEE,$02A,$CCC,$68E,$AAC,$EEA,$AAC,$EC2,$EC6
What should I change in the d32xr/src-md/crt0.s text to make load_font refer to the attached files instead of assembly code, and where is the lines responsible for palette data reading?
Attachments
fonts.rar
(3.85 KiB) Downloaded 6 times

Vic
Interested
Posts: 19
Joined: Wed Nov 03, 2021 6:01 pm

Re: Yet Another Tilemap and Super Scaler Demo

Post by Vic » Mon Sep 12, 2022 6:48 pm

Tomahomae wrote:
Sat Sep 10, 2022 3:52 am
Let's say, my font binary files attached below. Here is a palette data:

Code: Select all

$000,$EEE,$000,$EA0,$46C,$04E,$EEE,$EEE,$02A,$CCC,$68E,$AAC,$EEA,$AAC,$EC2,$EC6
What should I change in the d32xr/src-md/crt0.s text to make load_font refer to the attached files instead of assembly code, and where is the lines responsible for palette data reading?
Sorry, but you gonna have to get yourself acquainted with low-level coding for the MD in order to get your custom features work. Nobody's going to write your code for you.

Post Reply