Jump to content
IGNORED

Assembly->XB link project


Opry99er

Recommended Posts

Now I will attempt to draw the entire viewport in the proper location. I will leave the border out for now... That's why I can't really pad the write data, because on the left and right of the viewport there will be a permanent border. Blasting 2 ">20's" on each side of the map data would blow out my border. This is one reason I had thought about doing individual maps as opposed to one BIG map and doing math to display the proper section... CALL LINK (MAP2) could have the entire border in the map data... that adds 160 or so extra bytes to each map though...

With many of my demos, I have quick load and lots of memory, so I might very well have included the border in my map data. Two top and two bottom rows (of the border) wouldn't need to be in the map data. Moving 4 bytes to the VDP in between the rows of the viewport could certainly be done, and overall we would then "only" have to tell the VDP where to put the incoming byte once - instead of doing it 12 times (=height of viewport). I'm not sure we will save any time or memory - I think execution time would be about the same, and we would use some extra memory (storing and moving those 4 bytes).

Edited by sometimes99er
Link to comment
Share on other sites

I think you are talking about the workspace for passing parameters? Finding a good memory location to stuff the value into is tricky. For the sound player I ended up doing it "the right way", so there is an example if you want to look. I might have some time to strip out the necessary code as an example.

 

Ideally you could use LOAD to put a value in a register, then LINK to the routine. However, XB does a lot of work in between the two statements, so your value would be gone by the time LINK was called (I think you came to this conclusion.)

 

However, since your assembly is loaded into low memory, and since you control what goes in there, you could set aside some memory locations in your code specifically for passing data:

 

      DEF XPARMS,DRWMAP

XPARMS JMP  DRWMAP  Safety over-ride
      DATA >0000   Reserve space for passing parms
      DATA >0000

DRWMAP
.
.
.

Having a label before the data statements lets you use the REF/DEF table to find the address of the memory to use for passing your parms (and also lets you use the label in your code assembly code.) The JMP statement is a safety over ride that prevents a CALL LINK("XPARMS") from crashing.

 

The XPARMS label will be the first one in the REF/DEF table (which is at a fixed location), and the parm data would be the address two bytes beyond the address specified at the location of XPARMS in the REF/DEF table.

 

Matthew

Edited by matthew180
Link to comment
Share on other sites

Lottrup book chapter 7:

 

"The NUMREF utility stored at >6044 puts values in locations starting at >834A."

 

100 X=18
110 CALL LINK("NUMVAL",X)
120 END

 

 

	DEF NUMVAL

NUMVAL

	BLWP @>6044 (get numeric parameter routine)
	BLWP @>601C (convert floating point to integer)
	DATA >1200   (ROM routine to be executed
	MOV  @>834A,@>7F00 (move value to address 7F00)
	CLR   @>837C  (clear status byte
	B *R11 (return to BASIC)

 

 

I don't know if this is JUST a Minimem thing, but it looks viable

 

 

 

 

Link to comment
Share on other sites

To go back to an older idea, we could simply put labels and DEFs at the starting point of each map... then just CALL LINK("1x1"), CALL LINK("1x2"), CALL LINK("2x1"), CALL LINK("2x2"), etc.....

 

Or.... just tighten up the viewport and make this damn thing a scroller.... Hell, we could do scrolling in XB like this, but would have to save the music for just the non-exploration stages... like battle, etc.

 

Lots of things we could do. =)

 

 

Link to comment
Share on other sites

Here's what this is... It's the first 6 maps on the left side, followed by the 6 maps from the right side. I basically made a 144 high by 28 wide magellan map. Now it's possible. =) Just need to add labels, pretty easy to do from here...

 

 

 

* -- Map Row 0 --               		
MD10   DATA >8989,>8989,>8989,>8989	;
  	DATA >8989,>8989,>8989,>8989	;
  	DATA >8989,>8989,>8989,>7289	;
* -- Map Row 1 --               		
  	DATA >8989,>8989,>8989,>8966	;
  	DATA >6666,>6666,>6666,>6666	;
  	DATA >6666,>6689,>8989,>8989	;
* -- Map Row 2 --               		
  	DATA >8989,>8888,>8888,>8866	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>6689,>6666,>6666	;
* -- Map Row 3 --               		
  	DATA >8988,>8888,>8888,>8866	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>6689,>6688,>8989	;
* -- Map Row 4 --               		
  	DATA >8988,>8888,>8888,>8866	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8889,>6689,>6670,>7270	;
* -- Map Row 5 --               		
  	DATA >8989,>8988,>8888,>8866	;
  	DATA >6666,>6666,>6666,>6666	;
  	DATA >8888,>6666,>6689,>7072	;
* -- Map Row 6 --               		
  	DATA >8989,>8888,>8888,>6666	;
  	DATA >6666,>6666,>8888,>8866	;
  	DATA >8888,>8888,>8889,>8972	;
* -- Map Row 7 --               		
  	DATA >8988,>8866,>6666,>6666	;
  	DATA >6666,>6666,>8888,>8866	;
  	DATA >8888,>8888,>8888,>8889	;
* -- Map Row 8 --               		
  	DATA >8988,>8866,>8888,>6666	;
  	DATA >6666,>6666,>8888,>8866	;
  	DATA >6666,>6666,>6666,>6666	;
* -- Map Row 9 --               		
  	DATA >8988,>8866,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8889	;
* -- Map Row 10 --                  	
  	DATA >8989,>8866,>8888,>8888	;
  	DATA >8888,>8888,>888C,>8D8F	;
  	DATA >8888,>8888,>8888,>8989	;
* -- Map Row 11 --                  	
  	DATA >8989,>8866,>8888,>8888	;
  	DATA >8888,>8888,>888B,>8A8E	;
  	DATA >8888,>8888,>8889,>8989	;
* -- Map Row 12 --                  	
  	DATA >8988,>8866,>8888,>8888	;
  	DATA >8888,>8888,>8884,>8283	;
  	DATA >8888,>8888,>8889,>8970	;
* -- Map Row 13 --                  	
  	DATA >8988,>8866,>6666,>6666	;
  	DATA >6666,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8889,>7070	;
* -- Map Row 14 --                  	
  	DATA >8989,>8988,>8888,>8888	;
  	DATA >8866,>6666,>6667,>6767	;
  	DATA >6767,>6767,>8989,>7020	;
* -- Map Row 15 --                  	
  	DATA >8989,>8988,>8888,>8888	;
  	DATA >8888,>8888,>8867,>6767	;
  	DATA >6767,>6767,>7270,>7070	;
* -- Map Row 16 --                  	
  	DATA >8C8D,>8F89,>8989,>8989	;
  	DATA >8989,>8988,>8867,>6667	;
  	DATA >6767,>6767,>7272,>7070	;
* -- Map Row 17 --                  	
  	DATA >8B8A,>8E89,>8989,>8988	;
  	DATA >8888,>8888,>8866,>6767	;
  	DATA >7366,>6766,>8888,>7270	;
* -- Map Row 18 --                  	
  	DATA >8482,>8389,>8988,>8888	;
  	DATA >8888,>8888,>8867,>6766	;
  	DATA >6767,>6767,>8888,>8970	;
* -- Map Row 19 --                  	
  	DATA >6766,>6766,>6767,>8888	;
  	DATA >8888,>8888,>8867,>6767	;
  	DATA >6767,>6766,>8888,>8989	;
* -- Map Row 20 --                  	
  	DATA >8989,>8988,>8866,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >6788,>8888,>8888,>8889	;
* -- Map Row 21 --                  	
  	DATA >8989,>8988,>8867,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >6788,>8888,>8888,>8888	;
* -- Map Row 22 --                  	
  	DATA >8989,>8888,>8867,>6766	;
  	DATA >6767,>6767,>8888,>8888	;
  	DATA >6688,>8888,>8888,>8888	;
* -- Map Row 23 --                  	
  	DATA >8988,>8888,>8888,>8888	;
  	DATA >8888,>8867,>6766,>6767	;
  	DATA >6788,>8888,>8888,>8888	;
* -- Map Row 24 --                  	
  	DATA >8988,>8888,>8888,>8888	;
  	DATA >8888,>8867,>8888,>8888	;
  	DATA >6788,>8888,>8888,>8888	;
* -- Map Row 25 --                  	
  	DATA >8988,>8888,>8888,>8888	;
  	DATA >8888,>8867,>8888,>8888	;
  	DATA >6788,>8888,>8888,>8888	;
* -- Map Row 26 --                  	
  	DATA >8988,>8888,>8888,>8888	;
  	DATA >8888,>8867,>8989,>8888	;
  	DATA >6767,>8888,>8888,>8888	;
* -- Map Row 27 --                  	
  	DATA >8988,>8888,>8888,>8888	;
  	DATA >8888,>8867,>8988,>8888	;
  	DATA >6767,>6767,>6788,>8888	;
* -- Map Row 28 --                  	
  	DATA >8988,>8888,>8888,>6666	;
  	DATA >6666,>6667,>8888,>8888	;
  	DATA >8888,>8888,>6788,>8888	;
* -- Map Row 29 --                  	
  	DATA >8989,>8888,>8888,>6688	;
  	DATA >8888,>8889,>8888,>8888	;
  	DATA >8888,>8888,>6788,>8888	;
* -- Map Row 30 --                  	
  	DATA >8989,>8988,>8888,>6688	;
  	DATA >8889,>8989,>8888,>8888	;
  	DATA >8888,>8888,>6788,>8889	;
* -- Map Row 31 --                  	
  	DATA >8989,>8989,>8988,>6688	;
  	DATA >8989,>8989,>8988,>8867	;
  	DATA >6767,>6767,>6788,>8889	;
* -- Map Row 32 --                  	
  	DATA >8989,>8989,>8888,>6688	;
  	DATA >8989,>8989,>8988,>8867	;
  	DATA >8888,>8888,>8888,>8888	;
* -- Map Row 33 --                  	
  	DATA >8989,>8988,>8888,>6688	;
  	DATA >8989,>8989,>8888,>8867	;
  	DATA >8888,>8888,>8888,>8888	;
* -- Map Row 34 --                  	
  	DATA >8988,>8867,>6767,>6688	;
  	DATA >8889,>8989,>8888,>8866	;
  	DATA >6666,>6666,>6688,>8888	;
* -- Map Row 35 --                  	
  	DATA >8989,>8867,>6767,>6688	;
  	DATA >8888,>8889,>8989,>8888	;
  	DATA >8888,>8888,>6666,>6667	;
* -- Map Row 36 --                  	
  	DATA >8988,>8867,>6767,>6788	;
  	DATA >8888,>8889,>8989,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
* -- Map Row 37 --                  	
  	DATA >7088,>8867,>6767,>6767	;
  	DATA >6767,>678C,>8D8F,>8988	;
  	DATA >8989,>8989,>8989,>8888	;
* -- Map Row 38 --                  	
  	DATA >7088,>8867,>8888,>8888	;
  	DATA >8888,>678B,>8A8E,>8988	;
  	DATA >8989,>8888,>8888,>8889	;
* -- Map Row 39 --                  	
  	DATA >7089,>8867,>6788,>8888	;
  	DATA >8888,>6784,>8283,>8989	;
  	DATA >8888,>8888,>8888,>8889	;
* -- Map Row 40 --                  	
  	DATA >7089,>8888,>6788,>8888	;
  	DATA >8888,>6767,>6667,>6667	;
  	DATA >6788,>8888,>8888,>8889	;
* -- Map Row 41 --                  	
  	DATA >7070,>8988,>6788,>8C8D	;
  	DATA >8F88,>8889,>8989,>8888	;
  	DATA >6688,>8888,>8888,>8888	;
* -- Map Row 42 --                  	
  	DATA >7070,>8989,>6788,>8B8A	;
  	DATA >8E88,>8889,>8989,>8888	;
  	DATA >6788,>8888,>8888,>8888	;
* -- Map Row 43 --                  	
  	DATA >7070,>7067,>6788,>8482	;
  	DATA >8388,>8889,>8988,>8888	;
  	DATA >6767,>6667,>6767,>6767	;
* -- Map Row 44 --                  	
  	DATA >7070,>7067,>8888,>8888	;
  	DATA >8888,>8889,>8888,>8888	;
  	DATA >6767,>6767,>6767,>6688	;
* -- Map Row 45 --                  	
  	DATA >7070,>7067,>7270,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >6767,>6767,>6767,>6788	;
* -- Map Row 46 --                  	
  	DATA >7070,>7067,>7072,>7070	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >7270,>7067,>6767,>6788	;
* -- Map Row 47 --                  	
  	DATA >7072,>7067,>7070,>7270	;
  	DATA >7070,>7072,>7272,>7070	;
  	DATA >7070,>7070,>7070,>7270	;
* -- Map Row 48 --                  	
  	DATA >7070,>7067,>7070,>7070	;
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7070,>7070,>7070,>7270	;
* -- Map Row 49 --                  	
  	DATA >7070,>7067,>7070,>7070	;
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7070,>7070,>7072,>7089	;
* -- Map Row 50 --                  	
  	DATA >7070,>7067,>7070,>7070	;
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7070,>7070,>7289,>8989	;
* -- Map Row 51 --                  	
  	DATA >7070,>7067,>7070,>7070	;
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7070,>7072,>8989,>8989	;
* -- Map Row 52 --                  	
  	DATA >7070,>7067,>7070,>7070	;
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7070,>7289,>8989,>8988	;
* -- Map Row 53 --                  	
  	DATA >7070,>7067,>7070,>7070	;
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7070,>8989,>8989,>8888	;
* -- Map Row 54 --                  	
  	DATA >7070,>7067,>6767,>6767	;
  	DATA >6767,>6767,>6767,>6767	;
  	DATA >6767,>6767,>6767,>6767	;
* -- Map Row 55 --                  	
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7070,>6767,>7070,>7072	;
  	DATA >7289,>8967,>6767,>6767	;
* -- Map Row 56 --                  	
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7070,>7070,>7070,>7270	;
  	DATA >8989,>8967,>6767,>6767	;
* -- Map Row 57 --                  	
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7070,>7070,>7072,>7089	;
  	DATA >8989,>8967,>6767,>6767	;
* -- Map Row 58 --                  	
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7070,>7070,>7072,>7089	;
  	DATA >8989,>8867,>8888,>8888	;
* -- Map Row 59 --                  	
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7070,>7070,>7270,>8988	;
  	DATA >8988,>8867,>8888,>8888	;
* -- Map Row 60 --                  	
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7070,>7072,>7089,>8888	;
  	DATA >8888,>8867,>8888,>8888	;
* -- Map Row 61 --                  	
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7070,>7270,>8988,>8888	;
  	DATA >8888,>8867,>8888,>8888	;
* -- Map Row 62 --                  	
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7072,>7289,>8989,>8888	;
  	DATA >8888,>8867,>8888,>8888	;
* -- Map Row 63 --                  	
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7270,>8989,>8988,>8888	;
  	DATA >8888,>8867,>888C,>8D8F	;
* -- Map Row 64 --                  	
  	DATA >7070,>7070,>7070,>7072	;
  	DATA >7089,>8989,>8888,>8888	;
  	DATA >8888,>8867,>888B,>8A8E	;
* -- Map Row 65 --                  	
  	DATA >7070,>7070,>7072,>7270	;
  	DATA >8989,>8988,>8888,>8888	;
  	DATA >8888,>8867,>8884,>8283	;
* -- Map Row 66 --                  	
  	DATA >7070,>7070,>7072,>7089	;
  	DATA >8989,>8888,>8888,>8888	;
  	DATA >8888,>8867,>6767,>6767	;
* -- Map Row 67 --                  	
  	DATA >7070,>7070,>7072,>8989	;
  	DATA >8989,>8888,>8888,>8888	;
  	DATA >8888,>8867,>8888,>8888	;
* -- Map Row 68 --                  	
  	DATA >7070,>7070,>7270,>8989	;
  	DATA >8988,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
* -- Map Row 69 --                  	
  	DATA >7070,>7072,>7070,>8989	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
* -- Map Row 70 --                  	
  	DATA >7070,>7272,>7089,>8988	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
* -- Map Row 71 --                  	
  	DATA >7070,>7220,>7089,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
* -- Map Row 72 --                  	
  	DATA >8989,>8989,>8989,>8989	;
  	DATA >8989,>8989,>8989,>8989	;
  	DATA >8989,>8989,>8989,>8989	;
* -- Map Row 73 --                  	
  	DATA >8889,>8988,>888C,>8D8F	;
  	DATA >8889,>8988,>8889,>8989	;
  	DATA >8989,>8988,>8888,>8989	;
* -- Map Row 74 --                  	
  	DATA >8970,>8888,>888B,>8A8E	;
  	DATA >8866,>6666,>6666,>6689	;
  	DATA >8988,>8888,>8888,>8989	;
* -- Map Row 75 --                  	
  	DATA >7070,>7070,>8884,>8283	;
  	DATA >8866,>8888,>8888,>6689	;
  	DATA >8866,>6666,>6666,>8889	;
* -- Map Row 76 --                  	
  	DATA >7072,>7072,>8988,>8888	;
  	DATA >8866,>8888,>8888,>6688	;
  	DATA >8866,>8888,>8866,>8889	;
* -- Map Row 77 --                  	
  	DATA >7270,>8989,>8989,>8888	;
  	DATA >8866,>8888,>8888,>6666	;
  	DATA >6666,>8888,>8866,>8989	;
* -- Map Row 78 --                  	
  	DATA >8989,>8989,>8888,>8889	;
  	DATA >8866,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8866,>8972	;
* -- Map Row 79 --                  	
  	DATA >8989,>8988,>8888,>8888	;
  	DATA >8866,>8888,>8988,>8888	;
  	DATA >8888,>8889,>8866,>8970	;
* -- Map Row 80 --                  	
  	DATA >6666,>6666,>6666,>6688	;
  	DATA >8866,>8889,>8888,>8888	;
  	DATA >8988,>8888,>8866,>8972	;
* -- Map Row 81 --                  	
  	DATA >8988,>8888,>8888,>6688	;
  	DATA >8866,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8866,>7270	;
* -- Map Row 82 --                  	
  	DATA >8989,>8888,>8888,>6688	;
  	DATA >8866,>8888,>8889,>8989	;
  	DATA >6666,>6666,>6666,>7272	;
* -- Map Row 83 --                  	
  	DATA >8989,>8988,>8888,>6688	;
  	DATA >8866,>8888,>8870,>8989	;
  	DATA >6666,>6666,>6666,>7272	;
* -- Map Row 84 --                  	
  	DATA >7070,>8989,>8888,>6666	;
  	DATA >6666,>8889,>7072,>7089	;
  	DATA >6666,>6666,>6666,>7072	;
* -- Map Row 85 --                  	
  	DATA >2070,>7089,>8989,>8989	;
  	DATA >8889,>8870,>2072,>7089	;
  	DATA >6666,>6666,>6672,>7272	;
* -- Map Row 86 --                  	
  	DATA >7070,>7270,>8989,>8989	;
  	DATA >8989,>8988,>7270,>7272	;
  	DATA >6666,>6666,>7072,>7270	;
* -- Map Row 87 --                  	
  	DATA >7070,>7270,>7270,>7072	;
  	DATA >7089,>8989,>7070,>7270	;
  	DATA >7289,>8972,>7270,>7270	;
* -- Map Row 88 --                  	
  	DATA >7270,>7072,>7270,>7070	;
  	DATA >7070,>7070,>7070,>7272	;
  	DATA >7272,>7070,>7070,>7072	;
* -- Map Row 89 --                  	
  	DATA >7072,>8989,>7072,>7270	;
  	DATA >7270,>7070,>7072,>7270	;
  	DATA >7089,>7272,>7070,>7070	;
* -- Map Row 90 --                  	
  	DATA >7089,>8989,>8888,>8888	;
  	DATA >7072,>7088,>8888,>8888	;
  	DATA >8989,>8970,>7070,>7270	;
* -- Map Row 91 --                  	
  	DATA >7089,>8988,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8989,>7070,>7270	;
* -- Map Row 92 --                  	
  	DATA >7289,>8988,>8888,>6666	;
  	DATA >6666,>8888,>8888,>8888	;
  	DATA >8888,>8889,>8970,>7070	;
* -- Map Row 93 --                  	
  	DATA >7089,>8988,>8888,>6666	;
  	DATA >7166,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8989,>7270	;
* -- Map Row 94 --                  	
  	DATA >8989,>8988,>8888,>6666	;
  	DATA >6666,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8989,>7270	;
* -- Map Row 95 --                  	
  	DATA >8989,>8888,>8888,>7166	;
  	DATA >6666,>6666,>6666,>8888	;
  	DATA >8888,>8889,>8972,>7270	;
* -- Map Row 96 --                  	
  	DATA >8989,>8888,>8888,>6666	;
  	DATA >6666,>8888,>8866,>8888	;
  	DATA >8888,>8888,>8989,>7070	;
* -- Map Row 97 --                  	
  	DATA >8988,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8866,>8888	;
  	DATA >8888,>8889,>8972,>7070	;
* -- Map Row 98 --                  	
  	DATA >8988,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8866,>8888	;
  	DATA >8889,>8989,>7270,>7067	;
* -- Map Row 99 --                  	
  	DATA >898C,>8D8F,>8888,>8888	;
  	DATA >6666,>6666,>6666,>8888	;
  	DATA >8989,>8972,>7070,>7067	;
* -- Map Row 100 --             		
  	DATA >888B,>8A8E,>8888,>8888	;
  	DATA >6688,>8888,>8888,>8888	;
  	DATA >8989,>8989,>7070,>7067	;
* -- Map Row 101 --             		
  	DATA >8884,>8283,>8888,>8888	;
  	DATA >6688,>8888,>8888,>8888	;
  	DATA >8989,>8989,>7270,>7070	;
* -- Map Row 102 --             		
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >6666,>6666,>6666,>8889	;
  	DATA >8989,>8970,>7272,>7270	;
* -- Map Row 103 --             		
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8866,>8888	;
  	DATA >8989,>7070,>7070,>7070	;
* -- Map Row 104 --             		
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8889,>8866,>8888	;
  	DATA >8870,>7070,>7070,>7070	;
* -- Map Row 105 --             		
  	DATA >8888,>8888,>8888,>8989	;
  	DATA >8889,>8989,>8866,>8888	;
  	DATA >7070,>7070,>7272,>7070	;
* -- Map Row 106 --             		
  	DATA >8888,>8888,>8989,>8989	;
  	DATA >8989,>8988,>8866,>8888	;
  	DATA >7070,>7272,>7272,>7270	;
* -- Map Row 107 --             		
  	DATA >6666,>6666,>6666,>6666	;
  	DATA >6666,>6666,>6666,>8872	;
  	DATA >7272,>7070,>7270,>7270	;
* -- Map Row 108 --             		
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8889,>8888,>8872	;
  	DATA >7070,>7270,>7072,>7270	;
* -- Map Row 109 --             		
  	DATA >8888,>8888,>8888,>8989	;
  	DATA >8889,>8989,>8888,>8888	;
  	DATA >8888,>7072,>7272,>7270	;
* -- Map Row 110 --             		
  	DATA >8888,>8888,>8989,>8989	;
  	DATA >8989,>8988,>8888,>8888	;
  	DATA >8888,>8870,>7072,>7070	;
* -- Map Row 111 --             		
  	DATA >8888,>8889,>8989,>8989	;
  	DATA >8889,>8888,>8888,>8888	;
  	DATA >8888,>8888,>7070,>7070	;
* -- Map Row 112 --             		
  	DATA >8989,>8989,>8967,>6767	;
  	DATA >6767,>6788,>8888,>8888	;
  	DATA >8888,>8888,>8870,>7270	;
* -- Map Row 113 --             		
  	DATA >8989,>8989,>8967,>8888	;
  	DATA >8888,>6688,>8888,>8888	;
  	DATA >6767,>6767,>6788,>7070	;
* -- Map Row 114 --             		
  	DATA >8989,>8989,>8967,>8888	;
  	DATA >8888,>6688,>8888,>8888	;
  	DATA >6767,>6767,>6767,>6767	;
* -- Map Row 115 --             		
  	DATA >6767,>6767,>6767,>8889	;
  	DATA >8888,>6688,>8888,>8888	;
  	DATA >6767,>6767,>6788,>7070	;
* -- Map Row 116 --             		
  	DATA >8989,>8888,>8888,>8889	;
  	DATA >8988,>6688,>8888,>8888	;
  	DATA >6767,>6767,>6788,>7070	;
* -- Map Row 117 --             		
  	DATA >8889,>8989,>8989,>8989	;
  	DATA >8988,>6688,>8888,>8888	;
  	DATA >6788,>8989,>8989,>7072	;
* -- Map Row 118 --             		
  	DATA >7070,>7089,>8989,>8989	;
  	DATA >8989,>6666,>6666,>6666	;
  	DATA >6789,>8972,>7270,>7272	;
* -- Map Row 119 --             		
  	DATA >7089,>7070,>7070,>7089	;
  	DATA >8989,>8989,>8989,>8989	;
  	DATA >8989,>8972,>7072,>7270	;
* -- Map Row 120 --             		
  	DATA >8989,>8989,>7088,>8889	;
  	DATA >8989,>8889,>8989,>8989	;
  	DATA >8989,>8970,>7070,>7070	;
* -- Map Row 121 --             		
  	DATA >8989,>8989,>8988,>8888	;
  	DATA >8888,>8888,>8989,>8989	;
  	DATA >8989,>8970,>7070,>7070	;
* -- Map Row 122 --             		
  	DATA >8989,>8989,>8988,>8888	;
  	DATA >8888,>8888,>8989,>8889	;
  	DATA >8989,>8970,>7070,>7070	;
* -- Map Row 123 --             		
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8889	;
  	DATA >8989,>8970,>7070,>7020	;
* -- Map Row 124 --             		
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8889	;
  	DATA >8989,>8970,>2070,>7070	;
* -- Map Row 125 --             		
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8989,>8970,>7070,>7070	;
* -- Map Row 126 --             		
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8989,>8989,>7070,>7070	;
* -- Map Row 127 --             		
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8989,>8920,>7070	;
* -- Map Row 128 --             		
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8889,>8970,>7070	;
* -- Map Row 129 --             		
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8889,>8989,>7020	;
* -- Map Row 130 --             		
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8989,>7070	;
* -- Map Row 131 --             		
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8989,>7067	;
* -- Map Row 132 --             		
  	DATA >8867,>6767,>6767,>6767	;
  	DATA >6767,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8889,>2067	;
* -- Map Row 133 --             		
  	DATA >8867,>8888,>8888,>8888	;
  	DATA >8867,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8967	;
* -- Map Row 134 --             		
  	DATA >8867,>8888,>8C8D,>8F88	;
  	DATA >8867,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8967	;
* -- Map Row 135 --             		
  	DATA >8867,>8888,>8B8A,>8E88	;
  	DATA >8867,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8867	;
* -- Map Row 136 --             		
  	DATA >8867,>8888,>8482,>8388	;
  	DATA >8867,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8867	;
* -- Map Row 137 --             		
  	DATA >8867,>8888,>8888,>8888	;
  	DATA >8867,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8867	;
* -- Map Row 138 --             		
  	DATA >6767,>6767,>6767,>6767	;
  	DATA >6767,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8867	;
* -- Map Row 139 --             		
  	DATA >8888,>8867,>8888,>8888	;
  	DATA >6767,>6767,>6767,>6767	;
  	DATA >6767,>8888,>8888,>8867	;
* -- Map Row 140 --             		
  	DATA >8888,>8867,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8867	;
  	DATA >6767,>8888,>8888,>8867	;
* -- Map Row 141 --             		
  	DATA >8888,>8867,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8867	;
  	DATA >6767,>6767,>6767,>6767	;
* -- Map Row 142 --             		
  	DATA >8888,>8867,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8867	;
  	DATA >6767,>8888,>8888,>8888	;
* -- Map Row 143 --             		
  	DATA >8888,>8867,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;

 

 

 

Edited by Opry99er
Link to comment
Share on other sites

I made a change... it will be much easier now. No need to skip bytes or anything. What I'm trying to do is avoid a mess in trying to label 1x1 and 1x2... I'm just skipping over the 28 bytes of map 1x2 when drawing map 1x1 before each carriage return. Now, it's all 12 maps, no skipping bytes, just straight 336 byte (12x28) VMBW writes with no calculations or skips.

 

How do I label 1x2? All the maps that are next to one another are inter-twined.

 

No big deal now... I've made it easy... see my above post. I just wanted to make it easy and decrease the amount of calculations needed by the draw routine. This will probably speed up my routine too. =)

Edited by Opry99er
Link to comment
Share on other sites

This is the current assembly code... I will be updating this with the new map data and adjusting the routines until it works. =)

 

 

 

 

 

  	DEF  DRAW

VDPWD  EQU  >8C00 			VDP RAM WRITE DATA
VDPWA  EQU  >8C02 			VDP RAM READ/WRITE ADDRESS
XBWS   EQU >83E0
R0LB   EQU XBWS+1
R1LB   EQU XBWS+3


DRAW   MOV  R11,R10   		SAVE XB RETURN ADDRESS

*Draw border (inefficient, but by golly it works)
LI R0,256   	starting location in VRAM
LI R1,BORDER	CPU data
LI R2,512   	number of bytes to write
BL @VMBW    	write it


  	LI   R0,322   	Start of VRAM screen name table (top left corner)
  	LI   R1,MAPDAT	CPU Map Data, 28 bytes per line
  	LI   R3,12    	12 rows of map data for viewport

* Set up the R2 counter each time a line is written.
DRW


  	LI   R2,28    	Write 28 bytes at a time (don't use hex if you don't have to)
  	BL   @VMBW    	Write the line
  	AI   R0,32    	R0 was not affected, so bump down 1 line in VRAM
AI R1,28    	Offset for next line of viewport
  	DEC  R3   		Count the line
  	JNE  DRW      	Loop if not done



  	B	*R10          	RETURN TO XB



* VDP MULTIPLE BYTE WRITE

VMBW   ORI  R0,>4000
  	MOVB @R0LB,@VDPWA
  	MOVB R0,@VDPWA
VMBW1  MOVB *R1+,R12
  	AI   R12,>6000 		ADD OFFSET
  	MOVB R12,@VDPWD
  	DEC  R2
  	JNE  VMBW1
  	
RT

 

 

 

 

 

As you'll notice, I made a couple adjustments to the VMBW routine... changing it from requiring the SWPB instructions to using Matthew's conventions of setting up a R0LB EQU which is essentially just XBWS+1.... This is pointing to the second byte in the XB workspace which happens to be the least significant byte of R0. This way, we only need send R0LB to the write address and then send the MSB of R0 to the write address... thereby eliminating the need for SWPB instructions. =)

 

Below is the current map data.... the labels are as follows (indicating what section is being drawn)

 

 


1X1
1X2
1X3
1X4
1X5
1X6
2X1
2X2
2X3
2X4
2X5
2X6

 

 

 

MAPDAT 
* -- Map Row 0 --                   	
1X1 
DATA >8989,>8989,>8989,>8989	;
  	DATA >8989,>8989,>8989,>8989	;
  	DATA >8989,>8989,>8989,>7289	;
* -- Map Row 1 --                   	
  	DATA >8989,>8989,>8989,>8966	;
  	DATA >6666,>6666,>6666,>6666	;
  	DATA >6666,>6689,>8989,>8989	;
* -- Map Row 2 --                   	
  	DATA >8989,>8888,>8888,>8866	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>6689,>6666,>6666	;
* -- Map Row 3 --                   	
  	DATA >8988,>8888,>8888,>8866	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>6689,>6688,>8989	;
* -- Map Row 4 --                   	
  	DATA >8988,>8888,>8888,>8866	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8889,>6689,>6670,>7270	;
* -- Map Row 5 --                   	
  	DATA >8989,>8988,>8888,>8866	;
  	DATA >6666,>6666,>6666,>6666	;
  	DATA >8888,>6666,>6689,>7072	;
* -- Map Row 6 --                   	
  	DATA >8989,>8888,>8888,>6666	;
  	DATA >6666,>6666,>8888,>8866	;
  	DATA >8888,>8888,>8889,>8972	;
* -- Map Row 7 --                   	
  	DATA >8988,>8866,>6666,>6666	;
  	DATA >6666,>6666,>8888,>8866	;
  	DATA >8888,>8888,>8888,>8889	;
* -- Map Row 8 --                   	
  	DATA >8988,>8866,>8888,>6666	;
  	DATA >6666,>6666,>8888,>8866	;
  	DATA >6666,>6666,>6666,>6666	;
* -- Map Row 9 --                   	
  	DATA >8988,>8866,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8889	;
* -- Map Row 10 --                  	
  	DATA >8989,>8866,>8888,>8888	;
  	DATA >8888,>8888,>888C,>8D8F	;
  	DATA >8888,>8888,>8888,>8989	;
* -- Map Row 11 --                  	
  	DATA >8989,>8866,>8888,>8888	;
  	DATA >8888,>8888,>888B,>8A8E	;
  	DATA >8888,>8888,>8889,>8989	;
1X2
* -- Map Row 12 --                  	
  	DATA >8988,>8866,>8888,>8888	;
  	DATA >8888,>8888,>8884,>8283	;
  	DATA >8888,>8888,>8889,>8970	;
* -- Map Row 13 --                  	
  	DATA >8988,>8866,>6666,>6666	;
  	DATA >6666,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8889,>7070	;
* -- Map Row 14 --                  	
  	DATA >8989,>8988,>8888,>8888	;
  	DATA >8866,>6666,>6667,>6767	;
  	DATA >6767,>6767,>8989,>7020	;
* -- Map Row 15 --                  	
  	DATA >8989,>8988,>8888,>8888	;
  	DATA >8888,>8888,>8867,>6767	;
  	DATA >6767,>6767,>7270,>7070	;
* -- Map Row 16 --                  	
  	DATA >8C8D,>8F89,>8989,>8989	;
  	DATA >8989,>8988,>8867,>6667	;
  	DATA >6767,>6767,>7272,>7070	;
* -- Map Row 17 --                  	
  	DATA >8B8A,>8E89,>8989,>8988	;
  	DATA >8888,>8888,>8866,>6767	;
  	DATA >7366,>6766,>8888,>7270	;
* -- Map Row 18 --                  	
  	DATA >8482,>8389,>8988,>8888	;
  	DATA >8888,>8888,>8867,>6766	;
  	DATA >6767,>6767,>8888,>8970	;
* -- Map Row 19 --                  	
  	DATA >6766,>6766,>6767,>8888	;
  	DATA >8888,>8888,>8867,>6767	;
  	DATA >6767,>6766,>8888,>8989	;
* -- Map Row 20 --                  	
  	DATA >8989,>8988,>8866,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >6788,>8888,>8888,>8889	;
* -- Map Row 21 --                  	
  	DATA >8989,>8988,>8867,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >6788,>8888,>8888,>8888	;
* -- Map Row 22 --                  	
  	DATA >8989,>8888,>8867,>6766	;
  	DATA >6767,>6767,>8888,>8888	;
  	DATA >6688,>8888,>8888,>8888	;
* -- Map Row 23 --                  	
  	DATA >8988,>8888,>8888,>8888	;
  	DATA >8888,>8867,>6766,>6767	;
  	DATA >6788,>8888,>8888,>8888	;
1X3
* -- Map Row 24 --                  	
  	DATA >8988,>8888,>8888,>8888	;
  	DATA >8888,>8867,>8888,>8888	;
  	DATA >6788,>8888,>8888,>8888	;
* -- Map Row 25 --                  	
  	DATA >8988,>8888,>8888,>8888	;
  	DATA >8888,>8867,>8888,>8888	;
  	DATA >6788,>8888,>8888,>8888	;
* -- Map Row 26 --                  	
  	DATA >8988,>8888,>8888,>8888	;
  	DATA >8888,>8867,>8989,>8888	;
  	DATA >6767,>8888,>8888,>8888	;
* -- Map Row 27 --                  	
  	DATA >8988,>8888,>8888,>8888	;
  	DATA >8888,>8867,>8988,>8888	;
  	DATA >6767,>6767,>6788,>8888	;

* -- Map Row 28 --                  	
  	DATA >8988,>8888,>8888,>6666	;
  	DATA >6666,>6667,>8888,>8888	;
  	DATA >8888,>8888,>6788,>8888	;
* -- Map Row 29 --                  	
  	DATA >8989,>8888,>8888,>6688	;
  	DATA >8888,>8889,>8888,>8888	;
  	DATA >8888,>8888,>6788,>8888	;
* -- Map Row 30 --                  	
  	DATA >8989,>8988,>8888,>6688	;
  	DATA >8889,>8989,>8888,>8888	;
  	DATA >8888,>8888,>6788,>8889	;
* -- Map Row 31 --                  	
  	DATA >8989,>8989,>8988,>6688	;
  	DATA >8989,>8989,>8988,>8867	;
  	DATA >6767,>6767,>6788,>8889	;
* -- Map Row 32 --                  	
  	DATA >8989,>8989,>8888,>6688	;
  	DATA >8989,>8989,>8988,>8867	;
  	DATA >8888,>8888,>8888,>8888	;
* -- Map Row 33 --                  	
  	DATA >8989,>8988,>8888,>6688	;
  	DATA >8989,>8989,>8888,>8867	;
  	DATA >8888,>8888,>8888,>8888	;
* -- Map Row 34 --                  	
  	DATA >8988,>8867,>6767,>6688	;
  	DATA >8889,>8989,>8888,>8866	;
  	DATA >6666,>6666,>6688,>8888	;
* -- Map Row 35 --                  	
  	DATA >8989,>8867,>6767,>6688	;
  	DATA >8888,>8889,>8989,>8888	;
  	DATA >8888,>8888,>6666,>6667	;
1X4
* -- Map Row 36 --                  	
  	DATA >8988,>8867,>6767,>6788	;
  	DATA >8888,>8889,>8989,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
* -- Map Row 37 --                  	
  	DATA >7088,>8867,>6767,>6767	;
  	DATA >6767,>678C,>8D8F,>8988	;
  	DATA >8989,>8989,>8989,>8888	;
* -- Map Row 38 --                  	
  	DATA >7088,>8867,>8888,>8888	;
  	DATA >8888,>678B,>8A8E,>8988	;
  	DATA >8989,>8888,>8888,>8889	;
* -- Map Row 39 --                  	
  	DATA >7089,>8867,>6788,>8888	;
  	DATA >8888,>6784,>8283,>8989	;
  	DATA >8888,>8888,>8888,>8889	;
* -- Map Row 40 --                  	
  	DATA >7089,>8888,>6788,>8888	;
  	DATA >8888,>6767,>6667,>6667	;
  	DATA >6788,>8888,>8888,>8889	;
* -- Map Row 41 --                  	
  	DATA >7070,>8988,>6788,>8C8D	;
  	DATA >8F88,>8889,>8989,>8888	;
  	DATA >6688,>8888,>8888,>8888	;
* -- Map Row 42 --                  	
  	DATA >7070,>8989,>6788,>8B8A	;
  	DATA >8E88,>8889,>8989,>8888	;
  	DATA >6788,>8888,>8888,>8888	;
* -- Map Row 43 --                  	
  	DATA >7070,>7067,>6788,>8482	;
  	DATA >8388,>8889,>8988,>8888	;
  	DATA >6767,>6667,>6767,>6767	;
* -- Map Row 44 --                  	
  	DATA >7070,>7067,>8888,>8888	;
  	DATA >8888,>8889,>8888,>8888	;
  	DATA >6767,>6767,>6767,>6688	;
* -- Map Row 45 --                  	
  	DATA >7070,>7067,>7270,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >6767,>6767,>6767,>6788	;
* -- Map Row 46 --                  	
  	DATA >7070,>7067,>7072,>7070	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >7270,>7067,>6767,>6788	;
* -- Map Row 47 --                  	
  	DATA >7072,>7067,>7070,>7270	;
  	DATA >7070,>7072,>7272,>7070	;
  	DATA >7070,>7070,>7070,>7270	;
1X5
* -- Map Row 48 --                  	
  	DATA >7070,>7067,>7070,>7070	;
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7070,>7070,>7070,>7270	;
* -- Map Row 49 --                  	
  	DATA >7070,>7067,>7070,>7070	;
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7070,>7070,>7072,>7089	;
* -- Map Row 50 --                  	
  	DATA >7070,>7067,>7070,>7070	;
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7070,>7070,>7289,>8989	;
* -- Map Row 51 --                  	
  	DATA >7070,>7067,>7070,>7070	;
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7070,>7072,>8989,>8989	;
* -- Map Row 52 --                  	
  	DATA >7070,>7067,>7070,>7070	;
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7070,>7289,>8989,>8988	;
* -- Map Row 53 --                  	
  	DATA >7070,>7067,>7070,>7070	;
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7070,>8989,>8989,>8888	;
* -- Map Row 54 --                  	
  	DATA >7070,>7067,>6767,>6767	;
  	DATA >6767,>6767,>6767,>6767	;
  	DATA >6767,>6767,>6767,>6767	;
* -- Map Row 55 --                  	
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7070,>6767,>7070,>7072	;
  	DATA >7289,>8967,>6767,>6767	;
* -- Map Row 56 --                  	
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7070,>7070,>7070,>7270	;
  	DATA >8989,>8967,>6767,>6767	;
* -- Map Row 57 --                  	
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7070,>7070,>7072,>7089	;
  	DATA >8989,>8967,>6767,>6767	;
* -- Map Row 58 --                  	
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7070,>7070,>7072,>7089	;
  	DATA >8989,>8867,>8888,>8888	;
* -- Map Row 59 --                  	
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7070,>7070,>7270,>8988	;
  	DATA >8988,>8867,>8888,>8888	;
1X6
* -- Map Row 60 --                  	
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7070,>7072,>7089,>8888	;
  	DATA >8888,>8867,>8888,>8888	;
* -- Map Row 61 --                  	
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7070,>7270,>8988,>8888	;
  	DATA >8888,>8867,>8888,>8888	;
* -- Map Row 62 --                  	
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7072,>7289,>8989,>8888	;
  	DATA >8888,>8867,>8888,>8888	;
* -- Map Row 63 --                  	
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7270,>8989,>8988,>8888	;
  	DATA >8888,>8867,>888C,>8D8F	;
* -- Map Row 64 --                  	
  	DATA >7070,>7070,>7070,>7072	;
  	DATA >7089,>8989,>8888,>8888	;
  	DATA >8888,>8867,>888B,>8A8E	;
* -- Map Row 65 --                  	
  	DATA >7070,>7070,>7072,>7270	;
  	DATA >8989,>8988,>8888,>8888	;
  	DATA >8888,>8867,>8884,>8283	;
* -- Map Row 66 --                  	
  	DATA >7070,>7070,>7072,>7089	;
  	DATA >8989,>8888,>8888,>8888	;
  	DATA >8888,>8867,>6767,>6767	;
* -- Map Row 67 --                  	
  	DATA >7070,>7070,>7072,>8989	;
  	DATA >8989,>8888,>8888,>8888	;
  	DATA >8888,>8867,>8888,>8888	;
* -- Map Row 68 --                  	
  	DATA >7070,>7070,>7270,>8989	;
  	DATA >8988,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
* -- Map Row 69 --                  	
  	DATA >7070,>7072,>7070,>8989	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
* -- Map Row 70 --                  	
  	DATA >7070,>7272,>7089,>8988	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
* -- Map Row 71 --                  	
  	DATA >7070,>7220,>7089,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
2X1
* -- Map Row 72 --                  	
  	DATA >8989,>8989,>8989,>8989	;
  	DATA >8989,>8989,>8989,>8989	;
  	DATA >8989,>8989,>8989,>8989	;
* -- Map Row 73 --                  	
  	DATA >8889,>8988,>888C,>8D8F	;
  	DATA >8889,>8988,>8889,>8989	;
  	DATA >8989,>8988,>8888,>8989	;
* -- Map Row 74 --                  	
  	DATA >8970,>8888,>888B,>8A8E	;
  	DATA >8866,>6666,>6666,>6689	;
  	DATA >8988,>8888,>8888,>8989	;
* -- Map Row 75 --                  	
  	DATA >7070,>7070,>8884,>8283	;
  	DATA >8866,>8888,>8888,>6689	;
  	DATA >8866,>6666,>6666,>8889	;
* -- Map Row 76 --                  	
  	DATA >7072,>7072,>8988,>8888	;
  	DATA >8866,>8888,>8888,>6688	;
  	DATA >8866,>8888,>8866,>8889	;
* -- Map Row 77 --                  	
  	DATA >7270,>8989,>8989,>8888	;
  	DATA >8866,>8888,>8888,>6666	;
  	DATA >6666,>8888,>8866,>8989	;
* -- Map Row 78 --                  	
  	DATA >8989,>8989,>8888,>8889	;
  	DATA >8866,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8866,>8972	;
* -- Map Row 79 --                  	
  	DATA >8989,>8988,>8888,>8888	;
  	DATA >8866,>8888,>8988,>8888	;
  	DATA >8888,>8889,>8866,>8970	;
* -- Map Row 80 --                  	
  	DATA >6666,>6666,>6666,>6688	;
  	DATA >8866,>8889,>8888,>8888	;
  	DATA >8988,>8888,>8866,>8972	;
* -- Map Row 81 --                  	
  	DATA >8988,>8888,>8888,>6688	;
  	DATA >8866,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8866,>7270	;
* -- Map Row 82 --                  	
  	DATA >8989,>8888,>8888,>6688	;
  	DATA >8866,>8888,>8889,>8989	;
  	DATA >6666,>6666,>6666,>7272	;
* -- Map Row 83 --                  	
  	DATA >8989,>8988,>8888,>6688	;
  	DATA >8866,>8888,>8870,>8989	;
  	DATA >6666,>6666,>6666,>7272	;
2X2
* -- Map Row 84 --                  	
  	DATA >7070,>8989,>8888,>6666	;
  	DATA >6666,>8889,>7072,>7089	;
  	DATA >6666,>6666,>6666,>7072	;
* -- Map Row 85 --                  	
  	DATA >2070,>7089,>8989,>8989	;
  	DATA >8889,>8870,>2072,>7089	;
  	DATA >6666,>6666,>6672,>7272	;
* -- Map Row 86 --                  	
  	DATA >7070,>7270,>8989,>8989	;
  	DATA >8989,>8988,>7270,>7272	;
  	DATA >6666,>6666,>7072,>7270	;
* -- Map Row 87 --                  	
  	DATA >7070,>7270,>7270,>7072	;
  	DATA >7089,>8989,>7070,>7270	;
  	DATA >7289,>8972,>7270,>7270	;
* -- Map Row 88 --                  	
  	DATA >7270,>7072,>7270,>7070	;
  	DATA >7070,>7070,>7070,>7272	;
  	DATA >7272,>7070,>7070,>7072	;
* -- Map Row 89 --                  	
  	DATA >7072,>8989,>7072,>7270	;
  	DATA >7270,>7070,>7072,>7270	;
  	DATA >7089,>7272,>7070,>7070	;
* -- Map Row 90 --                  	
  	DATA >7089,>8989,>8888,>8888	;
  	DATA >7072,>7088,>8888,>8888	;
  	DATA >8989,>8970,>7070,>7270	;
* -- Map Row 91 --                  	
  	DATA >7089,>8988,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8989,>7070,>7270	;
* -- Map Row 92 --                  	
  	DATA >7289,>8988,>8888,>6666	;
  	DATA >6666,>8888,>8888,>8888	;
  	DATA >8888,>8889,>8970,>7070	;
* -- Map Row 93 --                  	
  	DATA >7089,>8988,>8888,>6666	;
  	DATA >7166,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8989,>7270	;
* -- Map Row 94 --                  	
  	DATA >8989,>8988,>8888,>6666	;
  	DATA >6666,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8989,>7270	;
* -- Map Row 95 --                  	
  	DATA >8989,>8888,>8888,>7166	;
  	DATA >6666,>6666,>6666,>8888	;
  	DATA >8888,>8889,>8972,>7270	;
2X3
* -- Map Row 96 --                  	
  	DATA >8989,>8888,>8888,>6666	;
  	DATA >6666,>8888,>8866,>8888	;
  	DATA >8888,>8888,>8989,>7070	;
* -- Map Row 97 --                  	
  	DATA >8988,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8866,>8888	;
  	DATA >8888,>8889,>8972,>7070	;
* -- Map Row 98 --                  	
  	DATA >8988,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8866,>8888	;
  	DATA >8889,>8989,>7270,>7067	;
* -- Map Row 99 --                  	
  	DATA >898C,>8D8F,>8888,>8888	;
  	DATA >6666,>6666,>6666,>8888	;
  	DATA >8989,>8972,>7070,>7067	;
* -- Map Row 100 --                 	
  	DATA >888B,>8A8E,>8888,>8888	;
  	DATA >6688,>8888,>8888,>8888	;
  	DATA >8989,>8989,>7070,>7067	;
* -- Map Row 101 --                 	
  	DATA >8884,>8283,>8888,>8888	;
  	DATA >6688,>8888,>8888,>8888	;
  	DATA >8989,>8989,>7270,>7070	;
* -- Map Row 102 --                 	
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >6666,>6666,>6666,>8889	;
  	DATA >8989,>8970,>7272,>7270	;
* -- Map Row 103 --                 	
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8866,>8888	;
  	DATA >8989,>7070,>7070,>7070	;
* -- Map Row 104 --                 	
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8889,>8866,>8888	;
  	DATA >8870,>7070,>7070,>7070	;
* -- Map Row 105 --                 	
  	DATA >8888,>8888,>8888,>8989	;
  	DATA >8889,>8989,>8866,>8888	;
  	DATA >7070,>7070,>7272,>7070	;
* -- Map Row 106 --                 	
  	DATA >8888,>8888,>8989,>8989	;
  	DATA >8989,>8988,>8866,>8888	;
  	DATA >7070,>7272,>7272,>7270	;
* -- Map Row 107 --                 	
  	DATA >6666,>6666,>6666,>6666	;
  	DATA >6666,>6666,>6666,>8872	;
  	DATA >7272,>7070,>7270,>7270	;
2X4
* -- Map Row 108 --                 	
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8889,>8888,>8872	;
  	DATA >7070,>7270,>7072,>7270	;
* -- Map Row 109 --                 	
  	DATA >8888,>8888,>8888,>8989	;
  	DATA >8889,>8989,>8888,>8888	;
  	DATA >8888,>7072,>7272,>7270	;
* -- Map Row 110 --                 	
  	DATA >8888,>8888,>8989,>8989	;
  	DATA >8989,>8988,>8888,>8888	;
  	DATA >8888,>8870,>7072,>7070	;
* -- Map Row 111 --                 	
  	DATA >8888,>8889,>8989,>8989	;
  	DATA >8889,>8888,>8888,>8888	;
  	DATA >8888,>8888,>7070,>7070	;
* -- Map Row 112 --                 	
  	DATA >8989,>8989,>8967,>6767	;
  	DATA >6767,>6788,>8888,>8888	;
  	DATA >8888,>8888,>8870,>7270	;
* -- Map Row 113 --                 	
  	DATA >8989,>8989,>8967,>8888	;
  	DATA >8888,>6688,>8888,>8888	;
  	DATA >6767,>6767,>6788,>7070	;
* -- Map Row 114 --                 	
  	DATA >8989,>8989,>8967,>8888	;
  	DATA >8888,>6688,>8888,>8888	;
  	DATA >6767,>6767,>6767,>6767	;
* -- Map Row 115 --                 	
  	DATA >6767,>6767,>6767,>8889	;
  	DATA >8888,>6688,>8888,>8888	;
  	DATA >6767,>6767,>6788,>7070	;
* -- Map Row 116 --                 	
  	DATA >8989,>8888,>8888,>8889	;
  	DATA >8988,>6688,>8888,>8888	;
  	DATA >6767,>6767,>6788,>7070	;
* -- Map Row 117 --                 	
  	DATA >8889,>8989,>8989,>8989	;
  	DATA >8988,>6688,>8888,>8888	;
  	DATA >6788,>8989,>8989,>7072	;
* -- Map Row 118 --                 	
  	DATA >7070,>7089,>8989,>8989	;
  	DATA >8989,>6666,>6666,>6666	;
  	DATA >6789,>8972,>7270,>7272	;
* -- Map Row 119 --                 	
  	DATA >7089,>7070,>7070,>7089	;
  	DATA >8989,>8989,>8989,>8989	;
  	DATA >8989,>8972,>7072,>7270	;
2X5
* -- Map Row 120 --                 	
  	DATA >8989,>8989,>7088,>8889	;
  	DATA >8989,>8889,>8989,>8989	;
  	DATA >8989,>8970,>7070,>7070	;
* -- Map Row 121 --                 	
  	DATA >8989,>8989,>8988,>8888	;
  	DATA >8888,>8888,>8989,>8989	;
  	DATA >8989,>8970,>7070,>7070	;
* -- Map Row 122 --                 	
  	DATA >8989,>8989,>8988,>8888	;
  	DATA >8888,>8888,>8989,>8889	;
  	DATA >8989,>8970,>7070,>7070	;
* -- Map Row 123 --                 	
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8889	;
  	DATA >8989,>8970,>7070,>7020	;
* -- Map Row 124 --                 	
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8889	;
  	DATA >8989,>8970,>2070,>7070	;
* -- Map Row 125 --                 	
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8989,>8970,>7070,>7070	;
* -- Map Row 126 --                 	
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8989,>8989,>7070,>7070	;
* -- Map Row 127 --                 	
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8989,>8920,>7070	;
* -- Map Row 128 --                 	
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8889,>8970,>7070	;
* -- Map Row 129 --                 	
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8889,>8989,>7020	;
* -- Map Row 130 --                 	
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8989,>7070	;
* -- Map Row 131 --                 	
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8989,>7067	;
2X6
* -- Map Row 132 --                 	
  	DATA >8867,>6767,>6767,>6767	;
  	DATA >6767,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8889,>2067	;
* -- Map Row 133 --                 	
  	DATA >8867,>8888,>8888,>8888	;
  	DATA >8867,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8967	;
* -- Map Row 134 --                 	
  	DATA >8867,>8888,>8C8D,>8F88	;
  	DATA >8867,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8967	;
* -- Map Row 135 --                 	
  	DATA >8867,>8888,>8B8A,>8E88	;
  	DATA >8867,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8867	;
* -- Map Row 136 --                 	
  	DATA >8867,>8888,>8482,>8388	;
  	DATA >8867,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8867	;
* -- Map Row 137 --                 	
  	DATA >8867,>8888,>8888,>8888	;
  	DATA >8867,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8867	;
* -- Map Row 138 --                 	
  	DATA >6767,>6767,>6767,>6767	;
  	DATA >6767,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8867	;
* -- Map Row 139 --                 	
  	DATA >8888,>8867,>8888,>8888	;
  	DATA >6767,>6767,>6767,>6767	;
  	DATA >6767,>8888,>8888,>8867	;
* -- Map Row 140 --                 	
  	DATA >8888,>8867,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8867	;
  	DATA >6767,>8888,>8888,>8867	;
* -- Map Row 141 --                 	
  	DATA >8888,>8867,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8867	;
  	DATA >6767,>6767,>6767,>6767	;
* -- Map Row 142 --                 	
  	DATA >8888,>8867,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8867	;
  	DATA >6767,>8888,>8888,>8888	;
* -- Map Row 143 --                 	
  	DATA >8888,>8867,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;
  	DATA >8888,>8888,>8888,>8888	;

 

 

 

 

 

Edited by Opry99er
Link to comment
Share on other sites

Or.... just tighten up the viewport and make this damn thing a scroller....

Do you think your new map data layout makes scrolling more challenging or not ?

 

 

I made a change... it will be much easier now. No need to skip bytes or anything. What I'm trying to do is avoid a mess in trying to label 1x1 and 1x2... I'm just skipping over the 28 bytes of map 1x2 when drawing map 1x1 before each carriage return. Now, it's all 12 maps, no skipping bytes, just straight 336 byte (12x28) VMBW writes with no calculations or skips.

With much the same argument you could add left and right hand side border and space to the map data, enabling you to skip all the calculus (AI) and calls to VMBW, and then just have just one VMBW do the hole viewport. Wouldn't that make it easier ?

Link to comment
Share on other sites

The new map data essentially makes scrolling impossible. It's no longer a continuous map, but sections. This new data is more efficient for individual screen draws only.

The code is a fraction easier for whatever reason. I hope it's still easy to draw and update the world, export etc. !?

 

 

With the new data, it only takes one single VMBW to draw the whole viewport. :)

Nah, you're looping 12 times. You could call VMBW once if you added those borders. Making your code much more simple. You would go from

 

       LI   R0,322     Start of VRAM screen name table (top left corner)
       LI   R1,MAPDAT  CPU Map Data, 28 bytes per line
       LI   R3,12      12 rows of map data for viewport

DRW     LI   R2,28      Write 28 bytes at a time (don't use hex if you don't have to)
       BL   @VMBW      Write the line
       AI   R0,32      R0 was not affected, so bump down 1 line in VRAM
       AI   R1,28      Offset for next line of viewport
       DEC  R3         Count the line
       JNE  DRW        Loop if not done

to

 

       LI   R0,320     Start of VRAM screen name table (top left corner)
       LI   R1,MAPDAT  CPU Map Data, 32 bytes per line
       LI   R2,384     Write 12*32 bytes
       BL   @VMBW      Write the viewport

Link to comment
Share on other sites

Yep, I discussed that earlier.... But that adds +-160 bytes per map.... I love the idea though. :). If size isn't a big deal, I would like to do that. If you look at the Magellan file, I was actually planning to do that, based on maps 1-6 or so. :)

 

This is fun. Thanks for your help here, sometimes. :)

Link to comment
Share on other sites

I hope it's still easy to draw and update the world, export etc. !?

 

Yea, I still have the original .mag file... I made a duplicate which I altered/modified for this purpose. If I need to modify (which I will, absolutely) I can do it right in the original file and move it over to the long template. :)

Link to comment
Share on other sites

Yep, I discussed that earlier.... But that adds +-160 bytes per map.... I love the idea though. :). If size isn't a big deal, I would like to do that. If you look at the Magellan file, I was actually planning to do that, based on maps 1-6 or so. :)

 

This is fun. Thanks for your help here, sometimes. :)

With the big 72 high and 56 wide map, it is easy to update and export the world, and viewports/sections connects without question. If you leave/change that, you'll end up with more manual labour and then maybe making some code a bit smaller or easier to glance. I think you're making a mistake there, but again, you can prove me wrong.

Link to comment
Share on other sites

Well... How would I indicate 2X1... How would I label it? Since it's interweaved with 1X1?

 

Maybe label the first 28 bytes as 1X1 and then label the next 28 bytes immediately following the first 28 as 2X1.... Still use the "write 28, skip 28, CR, write 28, skip 28...." model. Would that work?

Edited by Opry99er
Link to comment
Share on other sites

I told you how, twice. Reserve a dedicated area in your code, or use XB's helper routines to pass values. The sound player has code specific to this, and even sets up passing back an error code if there is a problem. The former is easier but takes a little setup in XB, but only once. The later lets you use 100% XB to pass the values.

 

Ask specific questions if you don't understand something, post #153 for example...

Link to comment
Share on other sites

Matthew--- my specific question is "can I pass a string to assembly, i.e. "1X1" and load that string into a register?".

 

I know we can pass numbers, and you showed that in your numerous examples and your sound player. But can the string "1X1" be passed?

 

I'm working on getting the map parsing mostly right now... My above post where I said "need to figure out how to pass from XB to assembly" was me thinking out loud and making a note of it.

 

I'm still going through it all right now, and will have it done by tonight thanks to you and Karsten. :)

Link to comment
Share on other sites

Yes, you can pass a string from XB. *BUT*, what is a "string" exactly? Think about it. A string is a series of bytes, usually in the numeric range generally known as ASCII, where the value of 65 represents the letter 'A'. In your example, "1X1" would be 3 bytes with the decimal value of 49, 88, and 49. Thus, your question "can you put that into a register", rephrased is, "can you put 3 bytes into a register?" The answer is no.

 

However, why do you need to pass a 3 byte string to your assembly code? What are you trying to do with "1X1" on the assembly side?

Edited by matthew180
Link to comment
Share on other sites

Well... How would I indicate 2X1... How would I label it? Since it's interweaved with 1X1?

Well, not so long ago you actually managed to display a viewport namely the upper left corner of the big map ! Yes, you could say it's interweaved. You're having a pointer to VDP, and manipulating it to do some jumps (math), you're having a pointer to the MAPDAT, and also manipulating it to extract exactly what you want - even though it's interweaved (using simple math).

 

To display 1X1 you had R1 point to MAPDAT. To display 2x1 (if it's horizontal first) make R1 point to MAPDAT and add 28. The rest of the routine is the same. Believe it or not. Yes, it's the same !

 

To display 1x2 make R1 point to MAPDAT and add 12*56 (=672). The rest of the routine is the same. 2x2 is 12*56+28, 1x3 is 2*12*56 and so forth.

Edited by sometimes99er
Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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...