Jump to content
unhuman

Trolling / Reading / I've now got my idea!

Recommended Posts

1 hour ago, digress said:

Ok so I have done that previously with the tile scroll routine so I can find that again.

 

i compiled this using asm994a. almost worked for me. i got 1 error

 

 *** Warning #1: Missing END directive
  91  005E 0000         END   * WinAsm99 Supplied Directive

 

edit: i just realized that i don't need to alter that asm994a already added the end statement for me.

 

 

 

 

how do I set in memory these variables does that mean register0 of the f18a?

* R0	x1 value
* R1	y1 value
* R2	x2 value
* R3	y2 value
* R13   Color (0-3)

 

You can add a new line

       END

at the end to avoid the warning.

 

To initialize the registers, add something like this at the beginning of the routine right after the LINE label:

       MOV @>3000,R0
       MOV @>3002,R1
       MOV @>3004,R2
       MOV @>3006,R3

That will copy the VDP memory words at hex 3000 - hex 3006 to the four registers (choose your own memory locations). You then need to set up those words before starting the GPU.

 

You should perhaps also replace the RSTK instruction with an IDLE instruction followed by JMP LINE. Then the GPU will go idle after drawing one line, and when you enable it again it will draw another. I'm not sure how to add an IDLE instruction in WinAsm99. 

 

Share this post


Link to post
Share on other sites
4 hours ago, Asmusr said:

 I'm not sure how to add an IDLE instruction in WinAsm99. 

 

DATA >0340   will do it.

Share this post


Link to post
Share on other sites

You can also do this to make it a little more readable:

IDLE_OP EQU >0340
.
.
.
        DATA IDLE_OP

If the assembler had full MACRO support you could do the whole "DATA >0340" as IDLE_OP.

 

Either way, I also recommend using the XDT99 tools: https://atariage.com/forums/topic/233677-xdt99-new-ti-99-cross-development-tools-available/

 

Edited by matthew180

Share this post


Link to post
Share on other sites

IDLE keyword worked without anything needed

 

got it compiled several times. loaded to 0x3f00. setting those four bytes at 0x3000- 0x3006

checked the video memory using bluemsx to confirm the correct memory locations were updated and they were.

 

running it on the coleco with f18a

 

BML is working. I can move it around though its just garbled graphics

 

when I call the line routine it does alter some vram and can see a little graphic change in the upper left corner but not the line I was expecting

 

getting close.

 

 

Edited by digress

Share this post


Link to post
Share on other sites

Are you using the bitmap layer of the F18A (BML) or 9918A mode 2 (GM2)? The code is for BML and would have to be modified for GM2.

 

BTW, having the parameters at >3000 won't work in either case because this area is used for image data. You could use addresses just before or after your GPU program.

Share this post


Link to post
Share on other sites

i'm using 0x0000 for bml base and ignoring tiles for now.

 

it's definately drawing stuff just not correctly yet.

 

reduced bml to 100x100

 

moved those variables to 0x3de0 area that was blank

 

at the moment i have no sprites or tiles defined so I'm just messing with the BML. I'm even starting to understand the assembler a bit too.

 

setup of screen>>>>

      vdp_out(0,0);
        vdp_out(49,0x30);  //vdp_out(49,0x33);  // tiles ecm3/sprites ecm 3
        
        vdp_out(31,0xE2);//VR31 bit >80 vdp_out(31,0xf0);  // BML bitmap layer enable
        vdp_out(32,0x00);//12288 0x3000 //vdp_out(32,0x00);  // BML bitmap base address
        vdp_out(33,0x00);  // BML bitmap Bitmap x
        vdp_out(34,0x00);  // Bitmap y
        vdp_out(35,0x64);  //100 vdp_out(35,0x00);  //vdp_out(35,0xFF);  // Bitmap width  //VR35=0
        vdp_out(36,0x64);  //100 vdp_out(36,0xB0);  //vdp_out(36,0xB0);  // Bitmap height //0xB0

                      load_palette(title_pallette_f18a, 64);

        vdp_out(2,0x15);  // set name table to 0x1800
        name_table3=0x3b00; 
        vdp_out(3,0xe0);  //224 14436 vdp_out(3,0x80);  // set colour table to 0x2000 move to 01b00 + 256
        vdp_out(4,0x00);  // set tiles table to 0x0000
        vdp_out(5,0x1b00);  //112 0x1b00 temp dem 54 = 14366 14kb sprites ecm 3  sprites data to 0x2800 = 10K  5*2K
        vdp_out(6,5);  // sprites ecm 3  sprites data to 0x3000 = 12K  5*2K

        vdp_out(7,0x00);//vdp_out(7,0x41);  //VDP_SET_REGISTER( 7, 0x00);        // Black border

 

 

 

Edited by digress

Share this post


Link to post
Share on other sites

is there a preferred size of the BML. I got it working a little using a smaller size but if I set to 256x192 it corrupts the graphics & screen modes and sometimes locks up.

 

It's drawing pixels but not as coherant lines yet.

 

if it is using registers 0,1,2,3 they are used for setting the GM1 & GM2 and the name table etc. I'll post a small video so I can show what i'm seeing.

 

 

Share this post


Link to post
Share on other sites
55 minutes ago, digress said:

is there a preferred size of the BML. I got it working a little using a smaller size but if I set to 256x192 it corrupts the graphics & screen modes and sometimes locks up.

A 256x192 bitmap is using 12K, so you cannot use anything below 0x3000 for other things.

57 minutes ago, digress said:

if it is using registers 0,1,2,3 they are used for setting the GM1 & GM2 and the name table etc. I'll post a small video so I can show what i'm seeing.

CPU registers and VPD registers are different, if that's what you mean.

On 1/11/2020 at 8:34 PM, digress said:

        vdp_out(2,0x15);  // set name table to 0x1800

 Why 0x15?

On 1/11/2020 at 8:34 PM, digress said:

vdp_out(4,0x00);  // set tiles table to 0x0000

This is overlapping the bitmap.

On 1/11/2020 at 8:34 PM, digress said:

        vdp_out(5,0x1b00);  //112 0x1b00 temp dem 54 = 14366 14kb sprites ecm 3  sprites data to 0x2800 = 10K  5*2K

0x1b00? Not sure what you're trying to do here?

On 1/11/2020 at 8:34 PM, digress said:

        vdp_out(6,5);  // sprites ecm 3  sprites data to 0x3000 = 12K  5*2K

5x0x800 = 0x2800 (overlapping full screen bitmap)

 

You are not setting VDP reg 1, are you sure it's OK?

Share this post


Link to post
Share on other sites

I don't what i'm doing at all with the BML setup. Just guessing mostly.

 

just trying to move that stuff out of the way. there are no sprites or tiles set as i was only playing with the BML. i did have a setting for vr1 just was cropped out of the paste above.

 

I'm open to any suggestions. If something wrong that's what i'm trying to figure out. I had it draw a line from 1,1-100,100 diagionally that looked correct a couple of times. 

 

here is the more up to date setup 7 a video below

 

        vdp_out(0,0);
        vdp_out(1,0xe2);   //mode 2

        vdp_out(2,0x14);  
        vdp_out(3,0xe0);  //224 14436 vdp_out(3,0x80);  // set colour table to 0x2000 move to 01b00 + 256
        vdp_out(4,0x06);  // set tiles table to 0x0000

        vdp_out(5,112);  //112 0x1b00 temp dem 54 = 14366 14kb sprites ecm 3  sprites data to 0x2800 = 10K  5*2K
        vdp_out(6,6);  // sprites ecm 3  sprites data to 0x3000 = 12K  5*2K

        vdp_out(7,0x00);//vdp_out(7,0x41);  //VDP_SET_REGISTER( 7, 0x00);        // Black border

        vdp_out(49,0x30);  //vdp_out(49,0x33);  // tiles ecm3/sprites ecm 3
        vdp_out(31,0xE0);//vdp_out(31,0xE0);//VR31 bit >80 vdp_out(31,0xf0);  // BML bitmap layer enable
        vdp_out(32,0x00);//12288 0x3000 //vdp_out(32,0x00);  // BML bitmap base address
        vdp_out(33,0x00);  // BML Bitmap x
        vdp_out(34,0x00);  // BML Bitmap y
        vdp_out(35,100);  //256 vdp_out(35,0x00);  //vdp_out(35,0xFF);  // Bitmap width  //VR35=0
        vdp_out(36,100);  //100 vdp_out(36,0xB0);  //vdp_out(36,0xB0);  // Bitmap height //0xB0

 

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

I wrote my own slow routine which runs on the z80 only . I'll get back to trying your routine again soon. For  some reason I can't get it to work yet.

 

Colecovision with f18a vector graphics example

 

 

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...