Jump to content
Opry99er

Assembly->XB link project

Recommended Posts

Well.... looks like Codex's output is off.... His output gets screwy... All DATA lines are 16 bytes long... it holds out on the last 8 I need... I suppose I could add them manually... kinda sucks. I'm still not sure it's the last 8 bytes... I'll check and see. The only other option I have is to make my map size divisible by 16... I might try that. =)

 

16x24 will be my mapsize

Edited by Opry99er

Share this post


Link to post
Share on other sites

You're saying that Magellan has something wrong in the output ? You did XB output ? Try Assembler output and see if it looks better. I'll help with the conversion if it is.

 

What is your map size (map in memory) and what is your window size (part of map shown on screen) ?

 

Are you refining your maps as an ongoing process ? If they are finalized, maybe they are good for simple compression, or perhaps a number of HCHARs with a bunch of object coordinates (like 3 trees could be stored in 9 bytes (each having a coordinate and a object no.)).

 

Have you chosen to do Beryl in XB with assembler routines ?

Edited by sometimes99er

Share this post


Link to post
Share on other sites

You're saying that Magellan has something wrong in the output ? You did XB output ? Try Assembler output and see if it looks better. I'll help with the conversion if it is.

 

 

Magellan's output is good, but it's very rigid. Here's the entire output file for my map data of one of these maps....

 

 

 

910 DATA 136,136,136,136,136,136,136,136,136,136,136,136,136,137,136,102
920 DATA 136,136,136,112,112,112,112,112,112,112,136,136,136,136,136,136
930 DATA 136,136,137,137,136,137,137,137,136,102,136,136,136,136,112,112
940 DATA 112,112,112,112,136,136,136,136,136,136,137,137,137,137,137,137
950 DATA 137,136,136,102,136,136,136,136,136,112,112,112,112,112,136,136
960 DATA 136,136,136,137,137,137,137,137,136,137,136,136,136,102,136,136
970 DATA 136,136,136,136,112,112,112,112,136,136,136,136,137,137,137,103
980 DATA 103,103,103,103,103,102,102,102,136,136,136,136,136,136,136,112
990 DATA 112,112,136,136,137,137,137,137,137,103,136,136,136,136,102,136
1000 DATA 136,136,136,136,103,103,103,103,103,136,112,112,136,137,137,137
1010 DATA 137,137,137,103,136,136,136,136,102,136,136,136,136,136,103,103
1020 DATA 103,103,103,103,103,112,103,103,103,103,103,103,103,103,136,136
1030 DATA 136,136,102,136,136,136,136,136,103,103,103,103,103,136,112,112
1040 DATA 136,137,137,137,136,136,136,136,136,136,136,136,102,136,136,136
1050 DATA 136,136,103,103,103,103,103,136,112,112,112,112,136,137,137,137
1060 DATA 137,136,136,136,136,136,102,136,136,136,136,136,103,136,136,136
1070 DATA 136,136,112,112,112,112,112,112,112,137,137,137,136,136,136,136
1080 DATA 102,102,102,102,102,102,103,136,136,136,112,112,112,112,112,114
1090 DATA 112,112,112,112,112,112,112,136,136,136,136,136,136,136,136,136

 

 

 

As you can see... 19 lines of 16 bytes per line. That's a total of 304 bytes. My maps are 12x24, giving a total of 312 bytes. This leads me to believe that the maps created in Magellan must be a multiple of 16. Therefore, I'll need to adjust my maps a bit... I COULD render the whole viewport with borders each time I draw.... That size is 16x28... but I thought "if I'm already drawing more, why not add more map space?" This would give me the proper parameters for Magellan to give a solid output file. =)

 

Are you refining your maps as an ongoing process ? If they are finalized, maybe they are good for simple compression, or perhaps a number of HCHARs with a bunch of object coordinates (like 3 trees could be stored in 9 bytes (each having a coordinate and a object no.)).

 

 

The maps are just quick and dirty right now. Nothing final about them. I am simply using these to see if I can get my damn linkup assembly draw routine working. If I can get it working, I'll be modifying and making the maps more "appealing". For the time being, they're just mockups.

 

Have you chosen to do Beryl in XB with assembler routines ?

 

It's that obvious, is it? =) Well, actually I haven't decided. I wanted to see if I could get the tools and routines in place for what I'm trying to accomplish as a hybrid XB-assembly program... If I CAN get it working and HAVE the tools and routines I need in place, I plan to write "something." Really, an "adventure-rpg-lite" I think--- which will take place in the Beryl Universe.... but it won't be the massive RPG world I hoped for--- at least I don't THINK. =)

 

See, I was playing Legends 1 the other day, and it just stuck me... "THIS COULD HAVE BEEN SO MUCH BETTER!!!!" Don't get me wrong, it was a great game... but with today's technology, our copy and paste technology... I think an XB/assembly hybrid RPG could be so much faster and better. I am thinking of trying somthing small... Here are my steps I am shooting for.

 

1) Get some working assembly routines to link up with XB

2) Develop the maps (more fully)

3) Implement "exploration" routines (in XB)

4) Start adding features

 

That's the plan. Yes, I am going to TRY to do a small-scale RPG with this project, but I'm really focusing right now on screen draws in assembly and adjusting my offsets. Once we have a working routine and working maps.... it's on like M-Fing DONKEY KONG. =) If the speed is good for screen draws, I will try to implement other assembly routines which handle all the parts of the game which require speed.

Share this post


Link to post
Share on other sites

Owen are you going to have scrolling maps, cause I don't think basic can pass 312bytes of map data to a assemble routine very fast.

It might be ok for a map that is stationary so when you go off the left side it loads a new map.

 

Have you tested how long it take to read 312 byte from data statements in basic cause that is going to be your bottle neck. I think to make this work you need a assemble routine at startup to load all the map data in to a set memory location then you need a draw assemble routine to draw the map from the preloaded data.

 

maybe this is what you are doing, it's just not real clear.

Share this post


Link to post
Share on other sites

Yea--- it's all assembly as far as screens and maps. If you read my source code for my assembly routine, I am storing maps into memory and "LINK"ing the maps. All the BASIC code is doing during setup is defining characters, color sets, etc. All map data is stored in the 32k RAM and called upon as needed. :) The XB program has absolutely no idea what's going to be drawn or how. The assembly program takes care of all that. During the main game loop, XB will read the location of your PC and will LINK to other maps once you move to the right or left or up or down. It will be lightning quick--- when compared to XB anyway. No scrolling, just map by map loaded into VDP RAM as required by the XB program.

Edited by Opry99er

Share this post


Link to post
Share on other sites

Here's the source... part of it anyway

 

All I have to do when I pass control to assembly is load R1 with the label for the map data.

 

 

VMBW EQU  >2024

 DEF  DRAW
 
DRAW LI  R0,291 *starting location on screen
    LI  R1,MAP *label containing my map data
    LI  R3,12 *counter
DRW  LI  R2,26 *length of multiple byte write
    BLWP @VMBW *write it
    AI  R0,32
    DEC  R3 *counter
    JNE  DRW *if 12 writes haven't happened yet, jump back and load R2 again.
.
.
.
MAP1 BYTE 236,237,239,233,233,233,233
BYTE 233,233,233,233,232,232,199
.
.
.
MAP2 BYTE [color="#006666"]210[/color][color="#666600"],[/color][color="#006666"]208[/color][color="#666600"],[/color][color="#006666"]208[/color][color="#666600"],[/color][color="#006666"]210[/color][color="#666600"],[/color][color="#006666"]208[/color][color="#666600"],[/color][color="#006666"]235[/color][color="#666600"],[/color][color="#006666"]234[/color]
BYTE [color="#006666"]238[/color][color="#666600"],[/color][color="#006666"]233[/color][color="#666600"],[/color][color="#006666"]233[/color][color="#666600"],[/color][color="#006666"]233[/color][color="#666600"],[/color][color="#006666"]233[/color][color="#666600"],[/color][color="#006666"]232[/color][color="#666600"],[/color][color="#006666"]232[/color]
.
.
.

 

 

Share this post


Link to post
Share on other sites

As you can see... 19 lines of 16 bytes per line. That's a total of 304 bytes. My maps are 12x24, giving a total of 312 bytes. This leads me to believe that the maps created in Magellan must be a multiple of 16. Therefore, I'll need to adjust my maps a bit...

Yep, 19 * 16 = 304.

 

12 * 24 = 288 not 312.

 

Apparently Magellan always outputs XB DATA lines with 16 bytes. And the last line may then have the last map byte repeated until 16 bytes is reached (for that last line). That's what my tests have shown.

 

288 < 304. Looks good. All your map data (288) should fit (within 304).

 

288 / 16 = 18. Exactly. So 18 XB DATA lines should have been enough.

 

Looking at line 19 in your output, these nothing indicating that it's a byte repeated throughout. There must be something wrong somewhere. Sure it was 12 by 24 or was it 312 bytes - multipla of something ?

Edited by sometimes99er

Share this post


Link to post
Share on other sites

Therefore, I'll need to adjust my maps a bit... I COULD render the whole viewport with borders each time I draw.... That size is 16x28... but I thought "if I'm already drawing more, why not add more map space?" This would give me the proper parameters for Magellan to give a solid output file. =)

No need to adjust you maps. Just be sure that you've got the size right and you're working on the right data. You should be able to recognize some of the bytes along the first few lines and verify it's the right map data, and that the length/width of your map is there. At least I had no problem doing that with my tests.

Share this post


Link to post
Share on other sites

The maps are just quick and dirty right now. Nothing final about them. I am simply using these to see if I can get my damn linkup assembly draw routine working. If I can get it working, I'll be modifying and making the maps more "appealing". For the time being, they're just mockups.

Okay, I guess Magellan and map data will work best for you then. Opposed to HCHAR, rectangles and objects - of course rendered/drawn by assembly.

Share this post


Link to post
Share on other sites

1) Get some working assembly routines to link up with XB

2) Develop the maps (more fully)

3) Implement "exploration" routines (in XB)

4) Start adding features

 

That's the plan.

That's a good plan. Even I should be able to follow that. Start small, think big. :cool:

Share this post


Link to post
Share on other sites

12 * 24 = 288 not 312.

 

 

I meant 26. =) sorry... that should have been in my source, but I typo'd on that post. =)

 

Eh, what did you go from and where did you end up ? I thinking map and window sizes.

 

 

I created 6 maps (initially) at 12x26. I then expanded them to be 16x26. The above picture you replied to is the culmination of each of the 16x26 maps pieced together. Sorry if I was unclear. =) I'll be busy all day today, but I've posted my Magellan .mag file right here. Maps 5-10 are the individual maps, map 11 is the culmination. I have also included the exported DATA as well in the zip. sometimes, if you get a minute, take a glance at the .mag file and let me know what you think. =) Also, feel free to change the landscape around... =) I'd love to see what you can do!

MagellanForest.zip

Share this post


Link to post
Share on other sites

12 * 24 = 288 not 312.

I meant 26. =) sorry... that should have been in my source, but I typo'd on that post. =)

Okay, so 12 * 26 = 312. There's 16 bytes per XB DATA line. 312 / 16 = 19.5. So Magellan should have produced 20 lines, but you only showed up with 19 !?

 

19 * 16 = 304. 304 bytes won't hold 312 bytes.

 

What I'm saying is, there were probably nothing wrong with your map, and we just have to take care when handling and processing it.

 

Also, I don't know how well Magellan handles one big map, but it would probably be easier to line it all up with one big map instead of individual maps. The assembly will not be all that more difficult. Just a bit of simple math to get in there in the big map and extract the window we want.

Share this post


Link to post
Share on other sites

Magellan does great with large maps. The Beryl scrollers that Matthew and I wrote (respectively) use one large map of the lava world and scrolls one tile at a time. If you look at that .mag file I posted, the large map is essentially that....

 

I would just have to re-position it to the top left corner and erase the empty spaces by resizing the template... Takes 5 seconds to do... Then re-export it into one big map. Easy easy. I'll do that next and we can talk about the "simple math". ;)

Share this post


Link to post
Share on other sites

Here's the data for the one large map. I need to fix my converter program to do 8 bytes at a time to make it work with this properly. The current map is 48x52.

 

 

 

910 DATA 137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137
920 DATA 137,137,137,137,137,136,114,137,114,114,112,137,137,137,137,137
930 DATA 137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137
940 DATA 137,137,137,137,136,137,137,137,137,137,137,102,102,102,102,102
950 DATA 102,102,102,102,102,102,102,137,137,137,137,137,137,137,112,112
960 DATA 136,137,137,136,136,140,141,143,136,137,137,136,136,137,137,137
970 DATA 137,137,137,136,136,136,137,137,137,137,136,136,136,136,136,102
980 DATA 136,136,136,136,136,136,136,136,136,136,102,137,102,102,102,102
990 DATA 102,102,112,137,137,112,136,136,136,139,138,142,136,102,102,102
1000 DATA 102,102,102,137,137,136,136,136,136,136,137,137,137,136,136,136
1010 DATA 136,136,136,102,136,136,136,136,136,136,136,136,136,136,102,137
1020 DATA 102,136,137,137,137,102,112,112,112,112,112,112,136,132,130,131
1030 DATA 136,102,136,136,136,136,102,137,136,102,102,102,102,102,136,137
1040 DATA 137,136,136,136,136,136,136,102,136,136,136,136,136,136,136,136
1050 DATA 136,137,102,137,102,112,114,112,137,102,114,112,112,114,112,114
1060 DATA 137,136,136,136,136,102,136,136,136,136,102,136,136,102,136,136
1070 DATA 136,102,136,137,137,137,137,136,136,136,136,102,102,102,102,102
1080 DATA 102,102,102,102,136,136,102,102,102,137,112,114,112,102,112,112
1090 DATA 114,112,137,137,137,137,136,136,136,102,136,136,136,136,102,102
1100 DATA 102,102,136,136,136,102,137,137,137,137,136,136,136,136,102,102
1110 DATA 102,102,102,102,136,136,136,102,136,136,136,136,136,137,137,114
1120 DATA 114,102,114,112,137,137,137,137,136,136,136,137,136,102,136,136
1130 DATA 136,136,136,136,136,136,136,136,136,102,137,114,137,136,136,102
1140 DATA 102,102,102,102,102,102,102,102,136,136,136,102,136,136,136,136
1150 DATA 136,136,136,137,112,102,112,112,137,137,137,136,136,136,136,136
1160 DATA 136,102,136,136,137,136,136,136,136,136,136,137,136,102,137,112
1170 DATA 137,136,136,102,136,136,102,102,102,102,102,102,136,136,136,102
1180 DATA 102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102
1190 DATA 102,102,102,136,136,102,136,137,136,136,136,136,137,136,136,136
1200 DATA 136,102,137,114,137,136,136,102,136,136,136,136,136,136,136,136
1210 DATA 136,136,136,136,136,136,136,136,136,136,136,137,137,137,112,137
1220 DATA 137,136,136,136,136,136,102,136,136,102,136,136,136,136,136,136
1230 DATA 136,136,136,136,136,102,114,112,137,137,136,102,136,136,136,136
1240 DATA 136,136,136,136,136,140,141,143,136,136,136,136,136,136,137,137
1250 DATA 137,114,112,112,137,137,136,136,136,136,102,136,136,102,136,136
1260 DATA 136,137,137,137,102,102,102,102,102,102,114,114,137,137,136,102
1270 DATA 136,136,136,136,136,136,136,136,136,139,138,142,136,136,136,136
1280 DATA 136,137,137,137,112,112,114,114,137,137,137,136,136,136,102,136
1290 DATA 136,102,136,136,136,112,137,137,102,102,102,102,102,102,114,114
1300 DATA 137,136,136,102,136,136,136,136,136,136,136,136,136,132,130,131
1310 DATA 136,136,136,136,136,137,137,112,114,112,112,112,112,112,137,137
1320 DATA 136,136,102,102,102,102,136,137,112,114,112,137,102,102,102,102
1330 DATA 102,102,112,114,137,136,136,102,102,102,102,102,102,102,136,136
1340 DATA 136,136,136,136,136,136,136,136,136,137,112,112,112,112,114,112
1350 DATA 32,112,112,137,137,137,137,137,136,137,136,112,32,114,112,137
1360 DATA 102,102,102,102,102,114,114,114,137,137,137,136,136,136,136,136
1370 DATA 136,102,102,102,102,103,103,103,103,103,103,103,137,137,112,32
1380 DATA 112,112,112,112,112,112,114,112,137,137,137,137,137,137,137,136
1390 DATA 114,112,114,114,102,102,102,102,112,114,114,114,137,137,137,136
1400 DATA 136,136,136,136,136,136,136,136,136,103,103,103,103,103,103,103
1410 DATA 114,112,112,112,112,114,114,112,112,112,114,112,114,112,112,114
1420 DATA 112,137,137,137,112,112,114,112,114,137,137,114,114,112,114,112
1430 DATA 140,141,143,137,137,137,137,137,137,137,137,136,136,103,102,103
1440 DATA 103,103,103,103,114,114,112,112,114,112,112,112,114,112,112,114
1450 DATA 114,112,112,112,112,112,112,112,112,112,114,114,114,114,112,112
1460 DATA 112,112,112,114,139,138,142,137,137,137,137,136,136,136,136,136
1470 DATA 136,102,103,103,103,102,103,102,136,136,114,112,112,114,114,112
1480 DATA 112,114,137,137,112,114,114,112,114,112,112,112,112,114,114,112
1490 DATA 112,137,114,114,112,112,112,112,132,130,131,137,137,136,136,136
1500 DATA 136,136,136,136,136,103,103,102,103,103,103,103,136,136,137,112
1510 DATA 114,112,112,112,112,137,137,137,136,136,136,136,112,114,112,136
1520 DATA 136,136,136,136,137,137,137,112,112,112,114,112,103,102,103,102
1530 DATA 103,103,136,136,136,136,136,136,136,103,103,103,103,103,103,102
1540 DATA 136,136,137,137,112,114,114,114,112,137,137,136,136,136,136,136
1550 DATA 136,136,136,136,136,136,136,136,136,136,137,137,112,112,114,112
1560 DATA 137,137,137,136,136,102,136,136,136,136,136,136,136,136,136,136
1570 DATA 103,136,136,136,136,136,136,137,137,114,112,114,114,137,137,136
1580 DATA 136,136,102,102,102,102,136,136,136,136,136,136,136,136,136,137
1590 DATA 137,112,112,112,137,137,137,136,136,103,136,136,136,136,136,136
1600 DATA 136,136,136,136,103,136,136,136,136,136,136,136,137,114,112,114
1610 DATA 112,137,137,136,136,136,102,102,113,102,136,136,136,136,136,136
1620 DATA 136,136,136,136,137,137,112,112,137,137,136,136,136,103,103,102
1630 DATA 103,103,103,103,136,136,136,136,102,136,136,136,136,136,136,136
1640 DATA 137,114,112,112,137,137,137,136,136,136,102,102,102,102,136,136
1650 DATA 136,136,136,136,136,136,136,136,137,137,114,112,137,136,136,136
1660 DATA 136,136,136,136,136,136,136,102,103,102,136,136,103,136,136,136
1670 DATA 136,136,136,136,137,137,114,114,137,137,136,136,136,136,113,102
1680 DATA 102,102,102,102,102,102,136,136,136,136,136,137,137,114,114,112
1690 DATA 136,136,136,136,136,136,136,136,136,136,136,103,102,103,103,103
1700 DATA 102,136,136,136,136,136,136,136,137,137,112,114,137,137,136,136
1710 DATA 136,136,102,102,102,102,136,136,136,102,136,136,136,136,136,136
1720 DATA 137,137,112,112,136,136,136,136,136,136,136,136,136,136,136,102
1730 DATA 136,136,136,136,136,136,136,136,136,136,136,136,137,137,112,112
1740 DATA 137,136,136,136,136,136,136,136,136,136,136,136,136,102,136,136
1750 DATA 136,136,136,137,137,114,112,112,137,136,136,136,136,136,136,136
1760 DATA 136,136,136,103,136,136,136,136,136,136,136,136,136,136,136,136
1770 DATA 137,137,112,137,137,136,136,136,136,136,136,136,136,136,136,136
1780 DATA 136,102,136,136,136,137,137,137,114,112,112,112,137,136,136,136
1790 DATA 136,136,136,136,136,136,136,102,136,136,102,102,102,102,102,102
1800 DATA 136,136,136,136,137,137,137,137,137,140,141,143,136,136,136,136
1810 DATA 102,102,102,102,102,102,136,136,137,137,137,114,112,112,112,114
1820 DATA 137,136,136,136,136,136,102,102,102,102,102,102,102,102,102,136
1830 DATA 136,136,136,102,136,136,136,136,137,137,137,136,136,139,138,142
1840 DATA 136,136,136,136,102,136,136,136,136,136,136,136,137,137,137,137
1850 DATA 112,112,112,112,137,137,136,136,136,136,102,136,136,136,136,136
1860 DATA 137,137,137,137,136,136,136,102,136,136,136,137,137,137,137,136
1870 DATA 136,132,130,131,136,136,136,136,102,136,136,136,136,136,136,136
1880 DATA 137,137,137,137,114,112,112,112,137,137,137,136,136,136,102,136
1890 DATA 136,137,137,137,137,137,137,137,137,137,136,102,136,136,137,137
1900 DATA 137,137,136,136,136,136,136,136,136,136,136,136,102,102,102,102
1910 DATA 102,102,136,137,137,137,137,112,114,114,114,112,137,137,137,137
1920 DATA 137,136,102,136,137,137,137,137,137,137,137,137,137,137,137,102
1930 DATA 136,137,137,137,137,137,136,136,136,136,136,136,136,136,136,136
1940 DATA 136,136,136,136,136,102,136,136,137,137,112,112,112,112,112,112
1950 DATA 137,137,137,137,136,136,102,136,137,137,137,137,137,137,136,136
1960 DATA 136,136,136,103,136,136,136,136,136,136,136,136,136,136,136,136
1970 DATA 136,136,136,136,136,136,136,137,136,102,136,136,136,112,112,112
1980 DATA 112,112,112,112,137,137,137,136,136,136,102,136,137,137,137,137
1990 DATA 137,137,137,137,136,136,136,103,136,136,136,136,136,136,136,136
2000 DATA 136,136,136,136,136,136,137,137,136,137,137,137,136,102,136,136
2010 DATA 112,112,112,112,114,114,112,112,137,136,136,136,136,136,102,136
2020 DATA 136,137,137,137,136,140,141,143,137,137,136,103,136,136,136,136
2030 DATA 136,136,136,136,136,136,136,136,137,137,137,137,137,137,137,136
2040 DATA 136,102,136,136,112,112,114,114,114,114,114,112,137,137,136,136
2050 DATA 136,136,102,136,136,136,136,136,136,139,138,142,137,137,137,103
2060 DATA 103,103,103,103,103,103,102,102,102,102,102,102,102,102,102,102
2070 DATA 102,102,102,102,102,102,136,114,114,114,112,112,114,112,114,112
2080 DATA 136,136,136,136,136,136,103,136,136,136,136,136,136,132,130,131
2090 DATA 137,137,137,136,136,136,136,136,136,136,136,136,136,136,136,136
2100 DATA 136,136,136,136,136,136,136,137,136,136,136,114,112,112,114,112
2110 DATA 112,114,114,112,137,136,136,136,136,136,103,103,103,103,103,103
2120 DATA 136,136,136,136,136,137,137,137,137,137,136,136,136,136,136,136
2130 DATA 136,136,136,136,136,136,137,137,136,137,137,137,136,136,136,136
2140 DATA 136,136,112,114,114,114,114,112,137,136,136,136,136,136,136,136
2150 DATA 136,136,136,103,103,103,103,103,103,137,137,137,137,137,137,137
2160 DATA 137,137,136,136,136,136,136,136,137,137,137,137,137,137,137,136
2170 DATA 136,136,136,136,136,136,136,112,112,114,112,112,137,137,136,136
2180 DATA 136,136,136,136,136,136,136,103,103,136,103,103,103,136,136,137
2190 DATA 137,137,137,137,137,137,137,137,136,136,136,137,137,137,137,137
2200 DATA 136,137,136,136,136,136,136,136,136,136,136,136,112,112,112,112
2210 DATA 137,137,136,136,136,136,136,136,136,136,136,136,136,136,103,103
2220 DATA 103,103,136,136,136,137,137,137,137,137,137,137,137,137,137,137
2230 DATA 137,103,103,103,103,103,103,136,136,136,136,136,136,136,136,136
2240 DATA 136,112,112,112,137,137,137,136,136,136,140,141,143,136,136,136
2250 DATA 136,103,103,103,103,103,103,136,136,136,136,136,137,136,137,137
2260 DATA 137,137,137,137,137,103,136,136,136,136,102,136,136,136,136,136
2270 DATA 103,103,103,103,103,136,112,112,137,137,137,137,136,136,139,138
2280 DATA 142,136,136,136,136,103,103,103,103,103,103,103,136,136,136,136
2290 DATA 136,136,137,137,137,137,137,137,137,103,136,136,136,136,102,136
2300 DATA 136,136,136,136,103,103,103,103,103,103,103,112,112,114,137,137
2310 DATA 136,136,132,130,131,136,136,136,136,103,103,123,122,103,103,103
2320 DATA 103,103,103,103,103,103,103,103,103,103,103,103,103,103,136,136
2330 DATA 136,136,102,136,136,136,136,136,103,103,103,103,103,136,112,112
2340 DATA 112,114,114,137,136,136,136,136,136,136,136,136,136,103,103,120
2350 DATA 121,103,103,103,136,136,136,136,136,136,136,137,137,137,136,136
2360 DATA 136,136,136,136,136,136,102,136,136,136,136,136,103,103,103,103
2370 DATA 103,136,112,112,112,112,114,114,114,112,136,136,136,136,136,136
2380 DATA 136,136,103,103,103,103,103,103,136,136,136,136,136,136,112,112
2390 DATA 136,137,137,137,137,136,136,136,136,136,102,136,136,136,136,136
2400 DATA 103,136,136,136,136,136,112,112,112,112,112,112,112,114,112,112
2410 DATA 136,136,136,136,136,136,103,103,103,103,103,136,136,136,136,136
2420 DATA 136,136,112,112,112,112,112,137,137,137,136,136,136,136,102,102
2430 DATA 102,102,102,102,103,136,136,136,112,112,114,114,112,114,112,112
2440 DATA 112,112,112,112,112,136,136,136,136,136,136,136,136,136,136,136
2450 DATA 136,136,136,136,136,136,112,114,112,112,112,112,112,112,112,136
2460 DATA 136,136,136,136,136,136,136,136,136,136,136,136,112,112,114,112

 

 

 

=) This should be pretty easy to do. 48x52=2496. 2496/16 (for magellan output)=156. So, 156 Magellan DATA lines--- then my converter will convert 8 bytes at a time, giving me an even 312 lines of BYTEs for my source code.... each line containing 8 bytes. =)

 

Ahhh, math.

Share this post


Link to post
Share on other sites

Here's the converted BYTE list for the large map. =) We just need to put this into the source prior to assembly--- and set up the actual source to select viewports. enjoy!!!

 

***PS-- I'm re-posting the Magellan file here with the altered large map. Map 11 is the altered map with proper sizing I used to get this map data and convert using my XB program.

 

 

 

BYTE 233,233,233,233,233,233,233,233
BYTE 233,233,233,233,233,233,233,233
BYTE 233,233,233,233,233,233,233,233
BYTE 232,210,233,210,210,208,233,233
BYTE 233,233,233,233,233,233,233,233
BYTE 233,233,233,233,233,233,233,233
BYTE 233,233,233,233,233,233,233,233
BYTE 233,233,233,232,233,233,233,233
BYTE 233,233,233,198,198,198,198,198
BYTE 198,198,198,198,198,198,198,198
BYTE 198,233,233,233,233,233,233,233
BYTE 233,208,208,232,233,233,232,232
BYTE 232,236,237,239,232,233,233,233
BYTE 232,232,233,233,233,233,233,233
BYTE 233,232,232,232,233,233,233,233
BYTE 233,232,232,232,232,232,198,198
BYTE 232,232,232,232,232,232,232,232
BYTE 232,232,232,198,233,198,198,198
BYTE 198,198,198,198,208,233,233,233
BYTE 208,232,232,232,235,234,238,238
BYTE 232,198,198,198,198,198,198,198
BYTE 233,233,232,232,232,232,232,232
BYTE 233,233,233,232,232,232,232,232
BYTE 232,232,198,232,232,232,232,232
BYTE 232,232,232,232,232,232,198,198
BYTE 233,198,232,233,233,233,198,198
BYTE 208,208,208,208,208,208,232,232
BYTE 228,226,227,232,198,232,232,232
BYTE 232,232,198,233,232,198,198,198
BYTE 198,198,198,232,233,233,232,232
BYTE 232,232,232,232,232,198,232,232
BYTE 232,232,232,232,232,232,232,232
BYTE 232,233,198,233,198,208,210,210
BYTE 208,233,198,210,208,208,210,210
BYTE 208,210,233,232,232,232,232,232
BYTE 198,232,232,232,232,198,232,232
BYTE 232,198,232,232,232,198,232,232
BYTE 233,233,233,233,232,232,232,232
BYTE 232,198,198,198,198,198,198,198
BYTE 198,198,198,232,232,198,198,198
BYTE 198,233,208,210,208,198,208,208
BYTE 208,210,208,233,233,233,233,233
BYTE 232,232,232,198,232,232,232,232
BYTE 232,198,198,198,198,232,232,232
BYTE 232,198,233,233,233,233,232,232
BYTE 232,232,232,198,198,198,198,198
BYTE 198,198,232,232,232,198,232,232
BYTE 232,232,232,232,233,233,210,210
BYTE 210,198,210,208,233,233,233,233
BYTE 233,232,232,232,233,232,198,198
BYTE 232,232,232,232,232,232,232,232
BYTE 232,232,232,232,198,233,210,210
BYTE 233,232,232,198,198,198,198,198
BYTE 198,198,198,198,198,232,232,232
BYTE 232,198,232,232,232,232,232,232
BYTE 232,232,233,208,198,208,208,208
BYTE 233,233,233,232,232,232,232,232
BYTE 232,232,198,232,232,233,232,232
BYTE 232,232,232,232,232,233,232,232
BYTE 198,233,208,233,232,232,198,198
BYTE 232,232,198,198,198,198,198,198
BYTE 198,232,232,232,198,198,198,198
BYTE 198,198,198,198,198,198,198,198
BYTE 198,198,198,198,198,198,198,198
BYTE 198,198,198,232,232,198,232,232
BYTE 233,232,232,232,232,233,232,232
BYTE 232,232,232,198,233,210,233,233
BYTE 232,232,198,232,232,232,232,232
BYTE 232,232,232,232,232,232,232,232
BYTE 232,232,232,232,232,232,232,232
BYTE 232,233,233,233,208,233,233,233
BYTE 232,232,232,232,232,198,232,232
BYTE 232,198,232,232,232,232,232,232
BYTE 232,232,232,232,232,232,198,198
BYTE 210,208,233,233,232,198,232,232
BYTE 232,232,232,232,232,232,232,232
BYTE 232,236,237,239,232,232,232,232
BYTE 232,232,232,233,233,233,210,210
BYTE 208,208,233,233,232,232,232,232
BYTE 232,198,232,232,198,232,232,232
BYTE 232,233,233,233,198,198,198,198
BYTE 198,198,198,210,210,233,233,233
BYTE 232,198,232,232,232,232,232,232
BYTE 232,232,232,232,235,234,238,238
BYTE 232,232,232,232,232,233,233,233
BYTE 233,208,208,210,210,233,233,233
BYTE 233,232,232,232,198,232,232,232
BYTE 198,232,232,232,208,233,233,233
BYTE 198,198,198,198,198,198,210,210
BYTE 210,233,232,232,198,232,232,232
BYTE 232,232,232,232,232,232,232,232
BYTE 228,226,227,232,232,232,232,232
BYTE 232,233,233,208,210,208,208,208
BYTE 208,208,208,233,233,232,232,232
BYTE 198,198,198,198,232,233,208,208
BYTE 210,208,233,198,198,198,198,198
BYTE 198,198,208,210,233,232,232,232
BYTE 198,198,198,198,198,198,198,198
BYTE 232,232,232,232,232,232,232,232
BYTE 232,232,232,232,233,208,208,208
BYTE 208,208,210,208,128,208,208,208
BYTE 233,233,233,233,233,232,233,233
BYTE 232,208,128,210,208,233,198,198
BYTE 198,198,198,198,210,210,210,210
BYTE 233,233,233,232,232,232,232,232
BYTE 232,232,198,198,198,198,199,199
BYTE 199,199,199,199,199,199,233,233
BYTE 233,208,128,208,208,208,208,208
BYTE 208,208,210,208,233,233,233,233
BYTE 233,233,233,233,232,210,208,208
BYTE 210,210,198,198,198,198,208,208
BYTE 210,210,210,233,233,233,232,232
BYTE 232,232,232,232,232,232,232,232
BYTE 232,232,199,199,199,199,199,199
BYTE 199,199,210,208,208,208,208,208
BYTE 210,210,208,208,208,210,208,208
BYTE 210,208,208,210,208,233,233,233
BYTE 233,208,208,210,208,210,233,233
BYTE 233,210,210,208,210,208,236,236
BYTE 237,239,233,233,233,233,233,233
BYTE 233,233,233,232,232,199,198,198
BYTE 199,199,199,199,199,210,210,210
BYTE 208,208,210,208,208,208,210,210
BYTE 208,208,210,210,208,208,208,208
BYTE 208,208,208,208,208,208,210,210
BYTE 210,210,210,208,208,208,208,208
BYTE 208,210,235,234,238,233,233,233
BYTE 233,233,232,232,232,232,232,232
BYTE 232,198,199,199,199,198,199,199
BYTE 198,232,232,210,208,208,210,210
BYTE 210,208,208,210,233,233,208,208
BYTE 210,210,208,210,208,208,208,208
BYTE 208,210,210,208,208,233,210,210
BYTE 210,208,208,208,208,228,226,226
BYTE 227,233,233,232,232,232,232,232
BYTE 232,232,232,232,199,199,198,198
BYTE 199,199,199,199,232,232,233,233
BYTE 208,210,208,208,208,208,233,233
BYTE 233,233,232,232,232,232,208,208
BYTE 210,208,232,232,232,232,232,232
BYTE 233,233,233,208,208,208,210,210
BYTE 208,199,198,199,198,199,199,199
BYTE 232,232,232,232,232,232,232,232
BYTE 199,199,199,199,199,199,198,198
BYTE 232,232,233,233,208,210,210,210
BYTE 210,208,233,233,232,232,232,232
BYTE 232,232,232,232,232,232,232,232
BYTE 232,232,232,232,232,233,233,233
BYTE 208,208,210,208,233,233,233,233
BYTE 232,232,198,232,232,232,232,232
BYTE 232,232,232,232,232,232,199,199
BYTE 232,232,232,232,232,232,233,233
BYTE 233,210,208,210,210,233,233,233
BYTE 232,232,232,198,198,198,198,198
BYTE 232,232,232,232,232,232,232,232
BYTE 232,232,233,233,208,208,208,208
BYTE 233,233,233,232,232,199,232,232
BYTE 232,232,232,232,232,232,232,232
BYTE 232,232,199,232,232,232,232,232
BYTE 232,232,232,233,210,208,210,210
BYTE 208,233,233,232,232,232,198,198
BYTE 198,209,198,232,232,232,232,232
BYTE 232,232,232,232,232,232,233,233
BYTE 233,208,208,233,233,232,232,232
BYTE 232,199,199,198,199,199,199,199
BYTE 199,232,232,232,232,198,232,232
BYTE 232,232,232,232,232,232,233,233
BYTE 210,208,208,233,233,233,232,232
BYTE 232,232,198,198,198,198,232,232
BYTE 232,232,232,232,232,232,232,232
BYTE 232,232,233,233,210,208,233,233
BYTE 232,232,232,232,232,232,232,232
BYTE 232,232,232,198,199,198,232,232
BYTE 232,199,232,232,232,232,232,232
BYTE 232,232,233,233,210,210,233,233
BYTE 233,232,232,232,232,209,198,198
BYTE 198,198,198,198,198,198,232,232
BYTE 232,232,232,232,233,233,210,210
BYTE 210,208,232,232,232,232,232,232
BYTE 232,232,232,232,232,232,199,199
BYTE 198,199,199,199,198,232,232,232
BYTE 232,232,232,232,232,233,233,233
BYTE 208,210,233,233,232,232,232,232
BYTE 232,198,198,198,198,232,232,232
BYTE 232,198,232,232,232,232,232,232
BYTE 232,233,233,208,208,232,232,232
BYTE 232,232,232,232,232,232,232,232
BYTE 232,232,198,232,232,232,232,232
BYTE 232,232,232,232,232,232,232,232
BYTE 232,233,233,208,208,233,232,232
BYTE 232,232,232,232,232,232,232,232
BYTE 232,232,232,232,198,232,232,232
BYTE 232,232,232,233,233,210,208,208
BYTE 208,233,232,232,232,232,232,232
BYTE 232,232,232,232,232,199,232,232
BYTE 232,232,232,232,232,232,232,232
BYTE 232,232,232,232,233,233,208,208
BYTE 233,233,232,232,232,232,232,232
BYTE 232,232,232,232,232,232,232,232
BYTE 198,232,232,232,233,233,233,233
BYTE 210,208,208,208,233,232,232,232
BYTE 232,232,232,232,232,232,232,232
BYTE 232,198,232,232,198,198,198,198
BYTE 198,198,198,232,232,232,232,232
BYTE 233,233,233,233,233,236,237,237
BYTE 239,232,232,232,232,198,198,198
BYTE 198,198,198,198,232,232,233,233
BYTE 233,233,210,208,208,208,210,210
BYTE 233,232,232,232,232,232,198,198
BYTE 198,198,198,198,198,198,198,198
BYTE 198,232,232,232,232,198,232,232
BYTE 232,232,232,233,233,233,232,232
BYTE 232,235,234,238,232,232,232,232
BYTE 232,198,232,232,232,232,232,232
BYTE 232,232,233,233,233,233,208,208
BYTE 208,208,208,233,233,232,232,232
BYTE 232,232,198,232,232,232,232,232
BYTE 232,233,233,233,233,232,232,232
BYTE 232,198,232,232,232,233,233,233
BYTE 233,233,232,232,228,226,227,227
BYTE 232,232,232,232,198,232,232,232
BYTE 232,232,232,232,232,233,233,233
BYTE 233,233,210,208,208,208,233,233
BYTE 233,233,232,232,232,198,232,232
BYTE 232,233,233,233,233,233,233,233
BYTE 233,233,233,232,198,232,232,232
BYTE 233,233,233,233,232,232,232,232
BYTE 232,232,232,232,232,232,232,232
BYTE 198,198,198,198,198,198,232,232
BYTE 233,233,233,233,208,210,210,210
BYTE 210,208,233,233,233,233,233,233
BYTE 232,198,232,233,233,233,233,233
BYTE 233,233,233,233,233,233,233,233
BYTE 198,232,233,233,233,233,233,233
BYTE 232,232,232,232,232,232,232,232
BYTE 232,232,232,232,232,232,232,232
BYTE 232,198,232,232,233,233,208,208
BYTE 208,208,208,208,208,233,233,233
BYTE 233,233,232,232,198,232,233,233
BYTE 233,233,233,233,233,232,232,232
BYTE 232,232,232,199,232,232,232,232
BYTE 232,232,232,232,232,232,232,232
BYTE 232,232,232,232,232,232,232,232
BYTE 232,232,233,232,198,232,232,232
BYTE 232,208,208,208,208,208,208,208
BYTE 208,233,233,233,232,232,232,232
BYTE 198,232,233,233,233,233,233,233
BYTE 233,233,233,232,232,232,199,199
BYTE 232,232,232,232,232,232,232,232
BYTE 232,232,232,232,232,232,232,232
BYTE 233,233,232,233,233,233,232,232
BYTE 198,232,232,208,208,208,208,208
BYTE 210,210,208,208,233,232,232,232
BYTE 232,232,232,198,232,232,233,233
BYTE 233,233,232,236,237,239,233,233
BYTE 233,232,199,232,232,232,232,232
BYTE 232,232,232,232,232,232,232,232
BYTE 232,233,233,233,233,233,233,233
BYTE 233,232,232,198,232,232,208,208
BYTE 208,210,210,210,210,210,208,208
BYTE 233,233,232,232,232,232,198,198
BYTE 232,232,232,232,232,232,235,235
BYTE 234,238,233,233,233,199,199,199
BYTE 199,199,199,199,199,198,198,198
BYTE 198,198,198,198,198,198,198,198
BYTE 198,198,198,198,198,198,198,198
BYTE 232,210,210,210,208,208,210,210
BYTE 208,210,208,232,232,232,232,232
BYTE 232,232,199,232,232,232,232,232
BYTE 232,232,228,226,227,233,233,233
BYTE 233,232,232,232,232,232,232,232
BYTE 232,232,232,232,232,232,232,232
BYTE 232,232,232,232,232,232,232,232
BYTE 233,232,232,232,210,208,208,208
BYTE 210,208,208,210,210,208,233,233
BYTE 232,232,232,232,232,199,199,199
BYTE 199,199,199,199,232,232,232,232
BYTE 232,232,233,233,233,233,233,233
BYTE 232,232,232,232,232,232,232,232
BYTE 232,232,232,232,232,233,233,233
BYTE 232,233,233,233,232,232,232,232
BYTE 232,232,232,208,210,210,210,210
BYTE 210,208,233,232,232,232,232,232
BYTE 232,232,232,232,232,232,199,199
BYTE 199,199,199,199,199,233,233,233
BYTE 233,233,233,233,233,233,233,233
BYTE 232,232,232,232,232,232,233,233
BYTE 233,233,233,233,233,233,232,232
BYTE 232,232,232,232,232,232,232,232
BYTE 208,208,210,208,208,233,233,233
BYTE 232,232,232,232,232,232,232,232
BYTE 232,232,199,199,232,199,199,199
BYTE 199,232,232,233,233,233,233,233
BYTE 233,233,233,233,233,232,232,232
BYTE 232,233,233,233,233,233,232,232
BYTE 233,232,232,232,232,232,232,232
BYTE 232,232,232,232,208,208,208,208
BYTE 208,233,233,232,232,232,232,232
BYTE 232,232,232,232,232,232,232,232
BYTE 232,199,199,199,199,232,232,232
BYTE 232,233,233,233,233,233,233,233
BYTE 233,233,233,233,233,233,199,199
BYTE 199,199,199,199,199,232,232,232
BYTE 232,232,232,232,232,232,232,232
BYTE 232,208,208,208,233,233,233,233
BYTE 232,232,232,236,237,239,232,232
BYTE 232,232,232,199,199,199,199,199
BYTE 199,199,232,232,232,232,232,232
BYTE 233,232,233,233,233,233,233,233
BYTE 233,233,199,232,232,232,232,232
BYTE 198,232,232,232,232,232,199,199
BYTE 199,199,199,199,232,208,208,208
BYTE 233,233,233,233,232,232,235,235
BYTE 234,238,232,232,232,232,199,199
BYTE 199,199,199,199,199,199,232,232
BYTE 232,232,232,232,232,233,233,233
BYTE 233,233,233,233,233,199,232,232
BYTE 232,232,232,198,232,232,232,232
BYTE 232,232,199,199,199,199,199,199
BYTE 199,199,208,208,210,233,233,233
BYTE 232,232,228,226,227,232,232,232
BYTE 232,232,199,199,219,218,199,199
BYTE 199,199,199,199,199,199,199,199
BYTE 199,199,199,199,199,199,199,199
BYTE 199,199,232,232,232,232,198,198
BYTE 232,232,232,232,232,199,199,199
BYTE 199,199,199,232,208,208,208,208
BYTE 210,210,233,232,232,232,232,232
BYTE 232,232,232,232,232,199,199,199
BYTE 216,217,199,199,199,232,232,232
BYTE 232,232,232,232,232,233,233,233
BYTE 233,232,232,232,232,232,232,232
BYTE 232,232,198,232,232,232,232,232
BYTE 232,199,199,199,199,199,232,232
BYTE 208,208,208,208,210,210,210,210
BYTE 208,232,232,232,232,232,232,232
BYTE 232,232,199,199,199,199,199,199
BYTE 199,232,232,232,232,232,232,232
BYTE 208,208,232,233,233,233,233,233
BYTE 232,232,232,232,232,198,232,232
BYTE 232,232,232,232,199,232,232,232
BYTE 232,232,232,208,208,208,208,208
BYTE 208,208,208,210,208,208,232,232
BYTE 232,232,232,232,232,199,199,199
BYTE 199,199,199,232,232,232,232,232
BYTE 232,232,232,208,208,208,208,208
BYTE 208,233,233,233,232,232,232,232
BYTE 232,198,198,198,198,198,198,198
BYTE 199,232,232,232,208,208,210,210
BYTE 210,208,210,208,208,208,208,208
BYTE 208,208,208,232,232,232,232,232
BYTE 232,232,232,232,232,232,232,232
BYTE 232,232,232,232,232,232,208,208
BYTE 210,208,208,208,208,208,208,208
BYTE 208,232,232,232,232,232,232,232
BYTE 232,232,232,232,232,232,232,232

 

Forest2.zip

Share this post


Link to post
Share on other sites

2496/16 (for magellan output)=156.

Ahh, forget 16 !!!

 

I looked at your data (Post #63) ;)

 

Post #51, mapsize 16x24

 

Post #53, mapsize 12x26

 

Post #63, mapsize 16x26

 

You're specifying mapsize height first and width next. No. of lines and no. of columns. Just like we've learned with TIB and XB using HCHAR, DISPLAY and SPRITE.

 

Now, I suspect you tried and match the 16 bytes in XB DATA lines produced by Magellan. So you went from 12 to 16. You changed the number of rows. But one XB DATA line (16 bytes) works like horizontal. But don't think that 16 bytes is any magical number. Magellan will let you have any height and width, you don't have to think about those 16 bytes.

 

I would suggest you design your screen layout. You screen layout holds a map. Find a size for that. Now find how many bytes that is. Let's say we have 4K for map data. Divide 4K by the no. of bytes needed for one map. Now we know how many maps we can have. All of these maps are part of one big map. And that big map is easy to handle if it is rectangular.

 

Example.

One map: 12 lines (height) x 32 columns (width)

12 x 32 = 384 bytes (that's half the screen)

4K = 4,096 bytes

4,096 / 384 = 10,6667

We can have 10 maps.

We now need to arrange 10 maps to make one big rectangular map. Let's make it 5 maps high and 2 maps wide.

The big map will then be

12 x 5 = 60 characters high and

32 x 2 = 64 character wide.

60 * 64 = 3,840 which is (no surprise) less than 4K.

 

I hope it all makes sense.

 

What I'm saying is, select a window size and stick with it. ;)

Share this post


Link to post
Share on other sites

Here's the data for the one large map. I need to fix my converter program to do 8 bytes at a time to make it work with this properly. The current map is 48x52.

Forget about the converter for now. It seems like you want to move and then tries to do a little bit everywhere. Am I right ? Let's take one step and make sure we do it right. We can always go back and change things if we want.

 

We need to get a fix on the map shown on the screen layout. Is it going to be 10x20 or what suits the screen layout best (FORGET 16!). Then we find a way to the big map. Then we make the big map (preliminary design will do). Then we export and convert. Then we write a simple assembler program to show us the upper left corner of the big map at the correct location on screen. And then we worry about how to tell the assembler program which part of the big map to display. Does is sound plausible !?

 

;)

Share this post


Link to post
Share on other sites

This one is 12 high by 26 wide (MAP... not viewport, which is 16 high and 30 wide

 

forest2.jpg

 

 

 

*****

This next one is 20 high by 12 wide. ***I actually REALLY like this style... giving me the entire right side of the screen for data and stats.

 

12x20.jpg

 

I think I like that second one best... One thing I did was eliminate the space between the map and the border... Jury is still out on whether I want to leave that blank black space between the map and border... what you think looks best? I could still use the vertical-style map, just widen the port a bit left and right and make the actual map 18 high and 12 wide. =) Thoughts?

Edited by Opry99er

Share this post


Link to post
Share on other sites

I think I would do it like Zelda style. Maybe 18 or 20 characters high and 32 characters wide, no border. But you do what you want. I bet you have played more RPG than I. Look at those for inspiration. But sure, I like the last screenshot. It's different. If you want a border, I would make room between the border and the map (or as you so rightfully say, the viewport (I want my Amiga back!)).

 

:cool:

Share this post


Link to post
Share on other sites

We only fix on the viewport to get things done and move ahead. If we want, we can go back and change the viewport, with all the consequences it will have on every step thereafter, but it's doable.

 

You could also go back and reuse and adjust the monster you and Matthew created instead !?

 

:)

Edited by sometimes99er

Share this post


Link to post
Share on other sites

The one Matthew wrote is very cool.... It's all assembly and it's a scroller--- and that won't be possible in XB. I'd love to do this in all assembly, but I'm nowhere near that far along-- and have far more frustration dealing with assembly than is necessary. As far as his scroller, it's friggin amazing. I still have the source... it's in the codebox below.

 

 

 

  	DEF  MAIN

**
* VDP Memory Map
VDPRD  EQU  >8800         	* VDP read data
VDPSTA EQU  >8802         	* VDP status
VDPWD  EQU  >8C00         	* VDP write data
VDPWA  EQU  >8C02         	* VDP set read/write address

**
* Workspace
WRKSP  EQU  >8300         	* Workspace
R0LB   EQU  WRKSP+1       	* R0 low byte required by VDP routines
R1LB   EQU  WRKSP+3       	* R1 low byte
R2LB   EQU  WRKSP+5       	* R2 low byte
R3LB   EQU  WRKSP+7       	* R3 low byte

**
* VRAM Base Locations (must match the values set up in the
* set video mode subroutine.)
NAMETB EQU  >0000         	* Name table base
PTRNTB EQU  >2000         	* Pattern generator table base
COLRTB EQU  >0300         	* Color table base
SATRTB EQU  >0380         	* Sprite attribute table base
SPGTB  EQU  >2800         	* Sprite pattern generator table base


**
* General Workspace Use:
*
* R0  VDP routines will modify
* R1  VDP routines will modify
* R2  VDP routines will modify
* R3
* R4  Random number routine will modify
* R5  Random number routine will modify
* R6
* R7
* R8
* R9
* R10 Stack pointer
* R11 Return address
* R12
* R13
* R14 Local function state
* R15 Main state maching state


**
* Scratch pad RAM use - Variables
*
*       	>8300         	* Workspace
*       	>831F         	* Bottom of workspace
STACK  EQU  >8320         	* Subroutine stack, grows down (8 bytes)
*       	>8322         	* The stack is maintained in R10 and
*       	>8324         	* supports up to 4 BL calls
*       	>8326
TICK   EQU  >8328         	* 1 tick every 16.6ms (rolls after 18.2 mins)
VSYNC  EQU  >832A         	* 1 when VSYNC is detected, otherwise 0

INPSPD EQU  >832C         	* How often to poll user input
*       	>832E

P1LOC  EQU  >8330         	* Player offset in the map data
P1MX   EQU  >8332         	* Player map X
P1MY   EQU  >8334         	* Player map Y
P1SX   EQU  >8336         	* Player screen X
P1SY   EQU  >8338         	* Player screen Y

VPORTO EQU  >8340         	* Viewport top,left screen offset
VPORTX EQU  >8342         	* Viewport screen X
VPORTY EQU  >8344         	* Viewport screen Y
VPORTW EQU  >8346         	* Viewport width
VPORTH EQU  >8348         	* Viewport height
VPORTQ EQU  >834A         	* Half viewport width
VPORTR EQU  >834C         	* Half viewport height

MAPDAT EQU  >8350         	* Pointer to the map data
MAPDRW EQU  >8352         	* Map draw offset in map data
MAPW   EQU  >8354         	* Map width
MAPH   EQU  >8356         	* Map height
MAPW2  EQU  >8358         	* Map scroll right clamp
MAPH2  EQU  >835A         	* Map scroll bottom clamp

* Random Number Memory Map
RAND16 EQU  >83C0         	* 16-bit random number
RAND8  EQU  >83C1         	* 8-bit random number


**
* Runtime Constants
* In an EA3 program these will be in 8-bit RAM, in a cartridge they
* will be in 8-bit ROM.
*
VSTAT  DATA >8000         	* VDP vsync status
NUM01  DATA 1             	* 16-bit number 1
NUM02  DATA 2             	* 16-bit number 2
NUM03  DATA 3             	* 16-bit number 3


PATHLO BYTE 104           	* Range of path tile name
PATHHI BYTE 111
  	EVEN


**
* Program execution starts here
MAIN   LIMI 0
  	LWPI WRKSP

*  	Initialize the call stack and Finite State Machine (FSM)
  	LI   R10,STACK     	* Set up the stack pointer
  	LI   R15,STINIT    	* Initial state, one-time initialization
  	CLR  @TICK         	* Clear the tick counter


**
*  	Finite State Machine (FSM)
FSM00
  	CI   R15,STQUIT    	* WHILE R15 != STQUIT
  	JNE  FSM10
STQUIT BLWP @>0000        	* Quit

*  	Since interrupts are disabled to prevent the console ISR and GPL
*  	from wrecking things, use of the nice VDP interrupt is not possible,
*  	however the VDP vsync signal can be polled which will be close enough
*  	for a game and gives a good 1/60th of a second clock.
FSM10
  	CLR  @VSYNC        	* VSYNC indicator only active for a single cycle
  	CLR  R1
  	MOVB @VDPSTA,R1    	* Reading clears the VDP sync indicator
  	COC  @VSTAT,R1
  	JNE  FSM20         	* No VSYNC, skip updating the TICK

  	INC  @TICK         	* Increment the tick
  	INC  @VSYNC        	* Set the VSYNC indicator

*  	Branch to the current state
FSM20
  	B	*R15          	* SWITCH R15


*  	One time initialization
*
STINIT
  	BL   @GMODE        	* Set the graphics mode
  	BL   @LSCS         	* Load standard character set
  	BL   @OTINIT       	* One time initialization

  	LI   R15,STMLOD    	* Set next state
  	B	@FSM50        	* BREAK


*  	Load a map
*
STMLOD
  	BL   @MAPLOD
  	BL   @SCRNDW
  	LI   R15,STRUN
  	B	@FSM50        	* BREAK


*  	Main state when things are running, game is playing, etc.
*
STRUN
  	BL   @RENDER
  	BL   @PLYINP
  	B	@FSM50        	* BREAK


*  	Every state jumps here when complete so any necessary out-of-state
*  	logic or decision making can happen if necessary.
FSM50

FSM99
  	B	@FSM00        	* WEND
*// MAIN


*********************************************************************
*
* <subroutine skeleton>
*
SKEL
  	MOV  R11,*R10+     	* Push return address onto the stack

*  	Subroutine code here ...

  	DECT R10           	* Pop return address off the stack
  	MOV  *R10,R11
  	B	*R11
*// SKEL


*********************************************************************
*
* Get player input
*
PLYINP
  	C	@INPSPD,@NUM03
  	JEQ  PLY01
  	C	@VSYNC,@NUM01 	* Get input after the VSYNC
  	JEQ  PLY00
  	B	*R11
PLY00
  	INC  @INPSPD
  	B	*R11
PLY01
  	MOV  R11,*R10+     	* Push return address onto the stack

*  	Reset polling flag.
  	CLR  @INPSPD

  	MOV  @P1MX,R1      	* Get current location
  	MOV  @P1MY,R2
  	MOV  @P1LOC,R3
  	MOV  R3,R5         	* 2x2 path checking
  	A	@MAPW,R5      	* R5 = Y + 1
  	MOV  R3,R6
  	INC  R6            	* R6 = X + 1

*  	Test the joystick
  	LI   R12,>0006     	* Base CRU address for joystick 1

  	TB   1             	* Left
  	JEQ  PLY02
  	MOVB @SLTNAM,R4    	* Sprite name for left
  	DEC  R3            	* Adjust the location
  	DEC  R5
  	MOV  R3,R6
  	DEC  R1            	* Move left, X - 1
  	JLT  PLY99         	* Lower horizonal bound check 0
  	JMP  PLY10

PLY02  TB   2             	* Right
  	JEQ  PLY03
  	MOVB @SRTNAM,R4    	* Sprite name for right
  	INC  R3            	* Adjust the location
  	INCT R5
  	INC  R6
  	INCT R1            	* Move right, X + 2 for bound check
  	C	R1,@MAPW      	* Upper horizontal bound check
  	JGT  PLY99         	* There is no arithmetic >= so make two checks
  	JEQ  PLY99
  	DEC  R1            	* Readjust to real location, X + 1
  	JMP  PLY10

PLY03  TB   3             	* Down
  	JEQ  PLY04
  	MOVB @SDNNAM,R4    	* Sprite name for down
  	A	@MAPW,R3      	* Adjust the location
  	A	@MAPW,R5
  	MOV  R5,R6
  	INC  R6
  	INCT R2            	* Move down, Y + 2 for bound check
  	C	R2,@MAPH      	* Upper vertical bound check
  	JGT  PLY99         	* There is no arithmetic >= so make two checks
  	JEQ  PLY99
  	DEC  R2            	* Readjust to real location, Y + 1
  	JMP  PLY10

PLY04  TB   4             	* Up
  	JEQ  PLY10
  	MOVB @SUPNAM,R4    	* Sprite name for up
  	S	@MAPW,R3      	* Adjust the location
  	MOV  R3,R5
  	S	@MAPW,R6
  	DEC  R2            	* Move up, Y - 1
  	JLT  PLY99         	* Lower vertical bound check 0

PLY10
*  	Check if there was any change.
  	C	R3,@P1LOC
  	JEQ  PLY99

*  	The move is within the map bounds, so make
*  	sure the move is legal, i.e. on a path, etc.
  	CB   *R5,@PATHLO
  	JL   PLY99
  	CB   *R5,@PATHHI
  	JH   PLY99

  	CB   *R6,@PATHLO
  	JL   PLY99
  	CB   *R6,@PATHHI
  	JH   PLY99

*  	Move okay
  	MOV  R1,@P1MX      	* Save the new location
  	MOV  R2,@P1MY
  	MOV  R3,@P1LOC     	* Save the new location


*  	Adjust scrolling offset
  	S	@VPORTQ,R1    	* X - HalfVPwidth
  	JLT  PLY25         	* Less than 0, clamp to 0
  	C	R1,@MAPW2     	* Greater than MapW - HalfVPwidth, clamp
  	JLT  PLY30
  	MOV  @MAPW2,R1     	*
  	JMP  PLY30
PLY25
  	CLR  R1

PLY30
  	S	@VPORTR,R2    	* Y - HalfVPwidth
  	JLT  PLY35         	* Less than 0, clamp to 0
  	C	R2,@MAPH2     	* Greater than MapH - HalfVPheight, clamp
  	JLT  PLY40
  	MOV  @MAPH2,R2     	*
  	JMP  PLY40
PLY35
  	CLR  R2

PLY40
  	MPY  @MAPW,R2
  	A	R1,R3
  	A	@MAPDAT,R3
  	MOV  R3,@MAPDRW

  	BL   @P1UPDT

PLY99
  	DECT R10           	* Pop return address off the stack
  	MOV  *R10,R11
  	B	*R11
*// PLYINP


*********************************************************************
*
* Update the player sprite
*
P1UPDT
*  	Calculate the player viewport location
  	MOV  @P1LOC,R3
  	S	@MAPDRW,R3
  	CLR  R2
  	DIV  @MAPW,R2      	* R2 = Y, R3 = X
  	A	@VPORTY,R2    	* Ajust to screen coordinates
  	A	@VPORTX,R3
  	MOV  R2,@P1SY      	* P1 screen Y
  	MOV  R3,@P1SX      	* P1 screen X

  	SLA  R2,3          	* Convert to sprite coordinates
  	SLA  R3,3

  	LI   R0,SATRTB
  	MOVB @R0LB,@VDPWA  	* Send low byte of VDP RAM write address
  	ORI  R0,>4000      	* Set read/write bits 14 and 15 to write (01)
  	MOVB R0,@VDPWA     	* Send high byte of VDP RAM write address

*  	Sprite 1
  	MOVB @R2LB,@VDPWD  	* Y
  	MOVB @R3LB,@VDPWD  	* X
  	MOVB R4,@VDPWD     	* Name
  	LI   R1,>0400      	* Dark blue
  	MOVB R1,@VDPWD

*  	Sprite 2
  	AI   R4,>0400      	* Next 4 patterns
  	MOVB @R2LB,@VDPWD  	* Y
  	MOVB @R3LB,@VDPWD  	* X
  	MOVB R4,@VDPWD     	* Name
  	LI   R1,>0500      	* Light blue
  	MOVB R1,@VDPWD

*  	Sprite 3
  	AI   R4,>0400      	* Next 4 patterns
  	MOVB @R2LB,@VDPWD  	* Y
  	MOVB @R3LB,@VDPWD  	* X
  	MOVB R4,@VDPWD     	* Name
  	LI   R1,>0A00      	* Dark yellow
  	MOVB R1,@VDPWD

*  	Sprite 4
  	AI   R4,>0400      	* Next 4 patterns
  	MOVB @R2LB,@VDPWD  	* Y
  	MOVB @R3LB,@VDPWD  	* X
  	MOVB R4,@VDPWD     	* Name
  	LI   R1,>0100      	* Black
  	MOVB R1,@VDPWD

  	B	*R11
*// P1UPDT


*********************************************************************
*
* Render the viewport
*
RENDER
*  	Only draw on the VSYNC
  	C	@VSYNC,@NUM01 	* If VSYNC is not active, return
  	JNE  REND99

* R0: screen row counter
* R1: map col counter
* R2: viewport col counter
* R3: map row counter
* R4: viewport row counter

  	MOV  @VPORTO,R0    	* Set the viewport location
  	MOV  @MAPDRW,R3
  	MOV  @VPORTH,R4
REND02
  	MOV  R3,R1
  	MOV  @VPORTW,R2    	* Viewport row counter

*  	Set up the VDP address.
  	MOVB @R0LB,@VDPWA  	* Send low byte of VDP RAM write address
  	ORI  R0,>4000      	* Set read/write bits 14 and 15 to write (01)
  	MOVB R0,@VDPWA     	* Send high byte of VDP RAM write address
  	ANDI R0,>3FFF      	* Restore R0
REND05
  	MOVB *R1+,@VDPWD
  	DEC  R2            	* Count the column
  	JNE  REND05

*  	End of current row, so adjust the row locations
  	DEC  R4
  	JEQ  REND99

  	AI   R0,32         	* Next screen row for viewport
  	A	@MAPW,R3      	* Next map data row
  	JMP  REND02

REND99
  	B	*R11
*// RENDER


*********************************************************************
*
* Draw other more static part of the screen
*
SCRNDW
  	MOV  R11,*R10+     	* Push return address onto the stack

*  	Draw a border around the viewport

*  	top
  	MOV  @VPORTO,R0
  	AI   R0,-33
  	MOVB @TBDRTL,R1    	* Top left border
  	BL   @VSBW         	* Set VDP address and write corner
  	MOVB @TBDRH,R1     	* Horizontal border
  	MOV  @VPORTW,R2
SCRN05 MOVB R1,@VDPWD     	* Write byte to VDP RAM
  	DEC  R2
  	JNE  SCRN05
  	MOVB @TBDRTR,@VDPWD	* Top right corner

*  	bottom
  	MOV  @VPORTO,R0
  	MOV  @VPORTH,R2
  	SLA  R2,5          	* Viewport height * 32
  	A	R2,R0         	* Add to viewport screen offset
  	DEC  R0
  	MOVB @TBDRBL,R1    	* Bottom left border
  	BL   @VSBW         	* Set VDP address and write corner
  	MOVB @TBDRH,R1     	* Horizontal border
  	MOV  @VPORTW,R2
SCRN10 MOVB R1,@VDPWD     	* Write byte to VDP RAM
  	DEC  R2
  	JNE  SCRN10
  	MOVB @TBDRBR,@VDPWD	* Bottom right corner

*  	left
  	MOV  @VPORTO,R0
  	DEC  R0
  	MOVB @TBDRV,R1     	* Vertical tile pattern
  	MOV  @VPORTH,R2
  	BL   @DRAWV

*  	right
  	MOV  @VPORTO,R0
  	A	@VPORTW,R0
  	MOV  @VPORTH,R2
  	BL   @DRAWV

  	DECT R10           	* Pop return address off the stack
  	MOV  *R10,R11
  	B	*R11
*// SCRNDW


*********************************************************************
*
* Load a map
*
MAPLOD
  	MOV  R11,*R10+     	* Push return address onto the stack

*  	Load map data from disk and set up the viewport and
*  	map sizes.

*  	The map data is currently fixed, so there is nothing to actually
*  	load right now.

*  	Calculate the viewport starting screen offset.
*  	Right now the viewport offset and size is hard coded, but it
*  	could be set in the software as a setting, or moved, resized,
*  	etc. at runtime.

  	LI   R0,1
  	MOV  R0,@VPORTX
  	MOV  R0,@VPORTY

  	SLA  R0,5
  	A	@VPORTX,R0
  	AI   R0,NAMETB
  	MOV  R0,@VPORTO    	* Viewport screen offset

  	LI   R0,19
  	MOV  R0,@VPORTW    	* Viewport width

  	LI   R0,15
  	MOV  R0,@VPORTH    	* Viewport height

*  	Set up variables to the map data which would normally be loaded
*  	from disk and may vary in size.
  	LI   R0,87
  	MOV  R0,@MAPW      	* Map width

  	LI   R0,54
  	MOV  R0,@MAPH      	* Map height

  	LI   R0,MAP6
  	MOV  R0,@MAPDAT    	* Map data
  	MOV  R0,@MAPDRW

  	AI   R0,88*4+2
  	MOV  R0,@P1LOC     	* Start on a path

*  	Get the viewport size / 2.  If the viewport is odd, subtract 1
*  	before dividing.
  	MOV  @VPORTW,R0
  	COC  @NUM01,R0     	* Test if the number is odd or even
  	JNE  MPLD05
  	DEC  R0            	* VPwidth - 1
MPLD05 SRL  R0,1          	* VPwidth / 2
  	MOV  R0,R1         	* Save HalfVPwidth

*  	Do the same for the viewport height.
  	MOV  @VPORTH,R0
  	COC  @NUM01,R0     	* Test if the number is odd or even
  	JNE  MPLD06
  	DEC  R0            	* VPheight - 1
MPLD06 SRL  R0,1          	* VPheight / 2
  	MOV  R0,R2         	* Save HalfVPheight

*  	R1 = VPwidth / 2
*  	R2 = VPheight / 2
  	MOV  R1,@VPORTQ
  	MOV  R2,@VPORTR

*  	Convert the player location into map X,Y coordinates.
  	CLR  R3
  	MOV  @P1LOC,R4
  	S	@MAPDAT,R4    	* Normalize the player location
  	DIV  @MAPW,R3      	* Divide 32-bit R3,R4 by the map width
  	MOV  R4,@P1MX
  	MOV  R3,@P1MY

  	MOV  @MAPW,@MAPW2
  	MOV  @MAPH,@MAPH2
  	S	@VPORTW,@MAPW2
  	S	@VPORTH,@MAPH2

*  	Load sprite patterns
  	LI   R0,SPGTB
  	LI   R1,SPRDAT
  	LI   R2,SPREND-SPRDAT
  	BL   @VMBW

*  	Update the player sprite
  	MOVB @SRTNAM,R4
  	BL   @P1UPDT

  	DECT R10           	* Pop return address off the stack
  	MOV  *R10,R11
  	B	*R11
*// MAPLOD


**
* Table based tile patterns to help make things easier
*
* Format: Tile name (0 to 255), number of pattern bytes
*     	Pattern Data, ...
*
* Use a label to set up references to specific tiles.  The
* generic labels here should be replaced with something
* meaningful.
*
* This data will be in 8-bit RAM for an EA3 program, and in
* 8-bit ROM for a cartridge.
*
* The "name" and "length" values could be bytes, but using
* full words makes the code easier.  If you have a lot of
* individual definitions, you may consider changing to BYTE.
*
PATDAT
  	DATA 96,16
  	DATA >8022,>0851,>0421,>8421
  	DATA >245A,>667E,>18FF,>AA55

  	DATA 104,80
  	DATA >8000,>0520,>8208,>0045
  	DATA >181C,>3631,>5E44,>8212
  	DATA >0000,>0000,>0000,>FF55
  	DATA >2000,>4C1E,>275B,>435B
  	DATA >1818,>3E67,>99A5,>817E
  	DATA >0800,>9A18,>7E7E,>189A
  	DATA >1C26,>E781,>E726,>261C
  	DATA >FF55,>0000,>0000,>0000
  	DATA >FFFF,>FFFF,>FFFF,>B7A2
  	DATA >FFFF,>FF9B,>9000,>0000

  	DATA 120,56
  	DATA >FFFF,>0000,>0000,>FFFF
  	DATA >C3C3,>C3C3,>C3C3,>C3C3
  	DATA >FFFF,>0303,>0303,>C3C3
  	DATA >C3C3,>0303,>0303,>FFFF
  	DATA >C3C3,>C0C0,>C0C0,>FFFF
  	DATA >FFFF,>C0C0,>C0C0,>C3C3
  	DATA >C081,>0204,>7849,>7A01

  	DATA 128,56
  	DATA >0111,>0741,>0B07,>4F0E
  	DATA >8080,>E480,>D0E2,>F070
  	DATA >0E1F,>1F1F,>3E3F,>1E0F
  	DATA >70F8,>F8F8,>BCFC,>B8F0
  	DATA >9E3F,>33F3,>F333,>BF1E
  	DATA >2004,>807F,>7F66,>6668
  	DATA >7EFF,>5AFF,>5ADB,>3C66

  	DATA 136,16
  	DATA >1818,>183C,>7E00,>4510
  	DATA >1E1F,>1E08,>3E08,>1433

  	DATA 144,8
  	DATA >183C,>187E,>3CFF,>7EFF

  	DATA 152,48
  	DATA >FC84,>B5A4,>A0FF,>2024 	* Top, Left border
  	DATA >3F21,>AD25,>05FF,>0424 	* Top, Right border
  	DATA >2420,>FFA0,>A4B5,>84FC 	* Bottom, Left border
  	DATA >2404,>FF05,>25AD,>213F 	* Bottom, Right border
  	DATA >0000,>FF00,>00FF,>0000 	* Horizontal border
  	DATA >2424,>2424,>2424,>2424 	* Vertical border
PATEND

TBDRTL BYTE 152
TBDRTR BYTE 153
TBDRBL BYTE 154
TBDRBR BYTE 155
TBDRH  BYTE 156
TBDRV  BYTE 157


**
* Color data is straight up, since there can only be 32
* bytes total, a table format is not really necessary.
COLDAT DATA >1010,>1010   	* 0-7 8-15, 16-23 24-31
  	DATA >1010,>1010   	* 32-39 40-47, 48-55 56-63
  	DATA >1010,>1010   	* 64-71 72-79, 80-87 88-95
  	DATA >A81E,>18A0   	* 96-103 104-111, 112-119 120-127
  	DATA >1E1E,>CEA0   	* 128-135 136-143, 144-151 152-159
  	DATA >1010,>1010   	* 160-167 168-175, 176-183 184-191
  	DATA >1010,>1010   	* 192-199 200-107, 208-215 216-223
  	DATA >1010,>1010   	* 224-231 232-239, 240-247 248-255


**
* Sprite pattern data
*
SUPNAM BYTE 0
SDNNAM BYTE 16
SLTNAM BYTE 32
SRTNAM BYTE 48
  	EVEN

SPRDAT
S1U	DATA >0000,>0204,>0810,>0000
  	DATA >0000,>0000,>0000,>0000
  	DATA >0000,>001C,>0200,>0030
  	DATA >3878,>7870,>E000,>0000
S2U	DATA >0002,>0408,>1100,>0001
  	DATA >0307,>0707,>0300,>0000
  	DATA >0000,>00E0,>0000,>E0C0
  	DATA >C080,>8080,>0000,>0000
S3U	DATA >0000,>0000,>4020,>3048
  	DATA >0000,>0000,>0000,>0000
  	DATA >0000,>0000,>7800,>0000
  	DATA >0000,>0000,>0000,>0000
S4U	DATA >0F1D,>79F3,>A6CF,>CFB6
  	DATA >FC78,>3818,>1C0F,>0700
  	DATA >80FE,>FF03,>85FF,>1F0E
  	DATA >0606,>060E,>1CF8,>F000

S1D	DATA >0000,>0007,>0E1E,>1E1C
  	DATA >0C00,>0040,>3800,>0000
  	DATA >0000,>0000,>0000,>0000
  	DATA >0000,>0810,>2040,>0000
S2D	DATA >0000,>0000,>0101,>0103
  	DATA >0307,>0000,>0700,>0000
  	DATA >0000,>00C0,>E0E0,>E0C0
  	DATA >8000,>0088,>1020,>4000
S3D	DATA >0000,>0000,>0000,>0000
  	DATA >0000,>001E,>0000,>0000
  	DATA >0000,>0000,>0000,>0000
  	DATA >120C,>0402,>0000,>0000
S4D	DATA >000F,>1F38,>7060,>6060
  	DATA >70F8,>FFA1,>C0FF,>7F01
  	DATA >00E0,>F038,>181C,>1E3F
  	DATA >6DF3,>F365,>CF9E,>B8F0

S1L	DATA >0008,>1010,>1101,>0000
  	DATA >0020,>1008,>0400,>0000
  	DATA >0000,>00E0,>F0F8,>7808
  	DATA >0000,>0000,>0000,>0000
S2L	DATA >0000,>0000,>0012,>1313
  	DATA >0940,>2010,>0800,>0000
  	DATA >0000,>0000,>0000,>80F0
  	DATA >F8F8,>7000,>0000,>0000
S3L	DATA >0000,>0008,>0808,>0800
  	DATA >0000,>0001,>0206,>0900
  	DATA >0000,>0000,>0000,>0000
  	DATA >0000,>0000,>0000,>0000
S4L	DATA >3E77,>6F67,>6664,>64EC
  	DATA >F69F,>CFE6,>7139,>361F
  	DATA >00F0,>F81C,>0E06,>0606
  	DATA >0606,>8EFC,>F8E0,>C080

S1R	DATA >0000,>0000,>0000,>0000
  	DATA >101E,>1F0F,>0700,>0000
  	DATA >0000,>0020,>1008,>0400
  	DATA >0000,>8088,>0808,>1000
S2R	DATA >0000,>0000,>000E,>1F1F
  	DATA >0F01,>0000,>0000,>0000
  	DATA >0000,>0010,>0804,>0290
  	DATA >C8C8,>4800,>0000,>0000
S3R	DATA >0000,>0000,>0000,>0000
  	DATA >0000,>0000,>0000,>0000
  	DATA >0090,>6040,>8000,>0000
  	DATA >0010,>1010,>1000,>0000
S4R	DATA >0103,>071F,>3F71,>6060
  	DATA >6060,>6070,>381F,>0F00
  	DATA >F86C,>9C8E,>67F3,>F96F
  	DATA >3726,>2666,>E6F6,>EE7C
SPREND


*********************************************************************
*
* One-Time Initialization
*
OTINIT
  	MOV  R11,*R10+     	* Push return address onto the stack

*  	Initialize tile pattern definitions
  	LI   R1,PATDAT     	* Start of defintion table
OTI01  MOV  *R1+,R0       	* Move the character code into R0
  	SLA  R0,3          	* Mul by 8 to adjust offset into PGT
  	AI   R0,PTRNTB     	* Add pattern generator table base
  	MOV  *R1+,R2       	* Move the byte count into R2
  	BL   @VMBW
  	CI   R1,PATEND
  	JNE  OTI01         	* Loop until end of table

*  	Set colors
  	LI   R0,COLRTB     	* Start with color set 5 (char 40)
  	LI   R1,COLDAT
  	LI   R2,32
  	BL   @VMBW

*  	Set player input polling timer
  	CLR  @INPSPD
  	INC  @INPSPD

*  	Set the 9901 to always read joystick 1 (column 6)
  	LI   R1,>0600      	* Keyboard column 6 (joystick 1)
  	LI   R12,>0024     	* Set the CRU port
  	LDCR R1,3          	* Load the CRU, setting the column latch

  	DECT R10           	* Pop return address off the stack
  	MOV  *R10,R11
  	B	*R11
*// OTINIT


**
* Graphics mode setup data.
*
GMDATA DATA >0000         	* M3 is bit 6 and is off for Graphics I
  	DATA >01E2         	* 16K,No Blank,Enable Int,M1,M2,0,16x16,No Mag
  	DATA >0200         	* Name Base Table to >0000 - >02FF (768 bytes)
  	DATA >030C         	* Color Table to >0300 - >0320 (32 bytes)
  	DATA >0404         	* Pattern Generator Table >2000 - >2800 (2048)
  	DATA >0507         	* Sprite Attribute Table >0380 - >03FF (128)
  	DATA >0605         	* Sprite Pattern Table >2800 - >3000 (2048)
  	DATA >07F1         	* Text color and background (border) color

*********************************************************************
*
* Sets the graphics mode
*
*                         	* Bit value 128 64 32 16  8  4  2  1
*                         	* Bit order   0  1  2  3  4  5  6  7
GMODE
  	MOV  R11,*R10+     	* Push return address onto the stack

  	LI   R1,GMDATA
  	LI   R2,8
GMODE1 MOV  *R1+,R0
  	BL   @VWTR
  	DEC  R2
  	JNE  GMODE1

*  	Turn off all sprites until ready to use them.
  	LI   R0,SATRTB     	* Disable all sprites
  	LI   R1,>D000      	* >D0 (208) to the vertical positions
  	LI   R2,128        	* 32 sprites, 4 bytes each entry
  	BL   @VSMW

*  	Set colors
  	LI   R0,COLRTB     	* Start of color table
  	LI   R1,>F400      	* White on dark blue
  	LI   R2,>0020      	* All color table entries (32 bytes)
  	BL   @VSMW

  	DECT R10           	* Pop return address off the stack
  	MOV  *R10,R11
  	B	*R11
*// GMODE


*********************************************************************
*
* Load a nice character set
*
LSCS
  	MOV  R11,*R10+     	* Push return address onto the stack

  	LI   R0,PTRNTB
  	LI   R1,SCS1
  	LI   R2,SCS1E-SCS1
  	BL   @VMBW

  	DECT R10           	* Pop return address off the stack
  	MOV  *R10,R11
  	B	*R11
*// LSCS


*********************************************************************
*
* Draw a horizontal row of characters, supports wrapping
*
* R0   	- VDP screen image table location to draw, destroyed
* R1   	- Character to draw
* R2   	- Length of the horizontal row, destroyed
*
DRAWH
DRAWH1 MOVB @R0LB,@VDPWA  	* Send low byte of VDP RAM write address
  	ORI  R0,>4000      	* Set read/write bits 14 and 15 to write (01)
  	MOVB R0,@VDPWA     	* Send high byte of VDP RAM write address
  	ANDI R0,>3FFF      	* Restore R0 to keep track of wrapping
DRAWH2 MOVB R1,@VDPWD     	* Write byte to VDP RAM
  	INC  R0            	* Track current screen location
  	DEC  R2            	* Track number of characters to write
  	JEQ  DRAWH5

  	CI   R0,768        	* Check if at the end of the screen
  	JL   DRAWH2
  	CLR  R0            	* Reset to 0,0
  	JMP  DRAWH1

DRAWH5 B	*R11
*// DRAWH


*********************************************************************
*
* Draw a vertical row of characters, supports wrapping
*
* R0   - VDP screen image table location to draw, destroyed
* R1   - Character to draw
* R2   - Length of the vertical row, destroyed
* R3   - Destroyed
*
* >NOTE< drawing vertical is very inefficient
*
DRAWV
DRAWV1 MOVB @R0LB,@VDPWA  	* Send low byte of VDP RAM write address
  	ORI  R0,>4000      	* Set read/write bits 14 and 15 to write (01)
  	MOVB R0,@VDPWA     	* Send high byte of VDP RAM write address
  	ANDI R0,>3FFF      	* Restore R0 to keep track of wrapping
  	MOVB R1,@VDPWD     	* Write byte to VDP RAM
  	AI   R0,32         	* Track current screen location
  	DEC  R2            	* Track number of characters to write
  	JEQ  DRAWV5

  	CI   R0,768        	* Check if at the end of the screen
  	JL   DRAWV1
  	AI   R0,-768       	* Adjust back to top row
  	INC  R0            	* Next column
  	JMP  DRAWV1

DRAWV5 B	*R11
*// DRAWV


*********************************************************************
*
* Generates a weak pseudo random number and places it in RAND16
*
* R4   - Destroyed
* R5   - 16-bit random number and stored in RAND16 for next round
*
RANDNO
  	LI   R4,28643      	* A prime number to multiply by
  	MPY  @RAND16,R4    	* Multiply by last random number
  	AI   R5,31873      	* Add a prime number
  	MOV  R0,R4         	* Save R0
  	MOV  @TICK,R0      	* Use the VSYNC tick to mix it up a little
  	ANDI R0,>000F      	* Check if shift count is 0
  	JEQ  RAND01        	* A 0 count means shift 16, which is a wash
  	SRC  R5,0          	* Mix up the number to break odd/even pattern
RAND01 MOV  R5,@RAND16    	* Save this number for next time
  	MOV  R4,R0         	* Restore R0
  	B	*R11
*// RANDNO


*********************************************************************
*
* VDP Single Byte Write
*
* R0   Write address in VDP RAM
* R1   MSB of R1 sent to VDP RAM
*
* R0 is modified, but can be restored with: ANDI R0,>3FFF
*
VSBW   MOVB @R0LB,@VDPWA  	* Send low byte of VDP RAM write address
  	ORI  R0,>4000      	* Set read/write bits 14 and 15 to write (01)
  	MOVB R0,@VDPWA     	* Send high byte of VDP RAM write address
  	MOVB R1,@VDPWD     	* Write byte to VDP RAM
  	B	*R11
*// VSBW


*********************************************************************
*
* VDP Single Byte Multiple Write
*
* R0   Starting write address in VDP RAM
* R1   MSB of R1 sent to VDP RAM
* R2   Number of times to write the MSB byte of R1 to VDP RAM
*
* R0 is modified, but can be restored with: ANDI R0,>3FFF
*
VSMW   MOVB @R0LB,@VDPWA  	* Send low byte of VDP RAM write address
  	ORI  R0,>4000      	* Set read/write bits 14 and 15 to write (01)
  	MOVB R0,@VDPWA     	* Send high byte of VDP RAM write address
VSMWLP MOVB R1,@VDPWD     	* Write byte to VDP RAM
  	DEC  R2            	* Byte counter
  	JNE  VSMWLP        	* Check if done
  	B	*R11
*// VSMW


*********************************************************************
*
* VDP Multiple Byte Write
*
* R0   Starting write address in VDP RAM
* R1   Starting read address in CPU RAM
* R2   Number of bytes to send to the VDP RAM
*
* R0 is modified, but can be restored with: ANDI R0,>3FFF
*
VMBW   MOVB @R0LB,@VDPWA  	* Send low byte of VDP RAM write address
  	ORI  R0,>4000      	* Set read/write bits 14 and 15 to write (01)
  	MOVB R0,@VDPWA     	* Send high byte of VDP RAM write address
VMBWLP MOVB *R1+,@VDPWD   	* Write byte to VDP RAM
  	DEC  R2            	* Byte counter
  	JNE  VMBWLP        	* Check if done
  	B	*R11
*// VMBW


*********************************************************************
*
* VDP Single Byte Read
*
* R0   Read address in VDP RAM
* R1   MSB of R1 set to byte from VDP RAM
*
VSBR   MOVB @R0LB,@VDPWA  	* Send low byte of VDP RAM write address
  	MOVB R0,@VDPWA     	* Send high byte of VDP RAM write address
  	MOVB @VDPRD,R1     	* Read byte from VDP RAM
  	B	*R11
*// VSBR


*********************************************************************
*
* VDP Multiple Byte Read
*
* R0   Starting read address in VDP RAM
* R1   Starting write address in CPU RAM
* R2   Number of bytes to read from VDP RAM
*
VMBR   MOVB @R0LB,@VDPWA  	* Send low byte of VDP RAM write address
  	MOVB R0,@VDPWA     	* Send high byte of VDP RAM write address
VMBRLP MOVB @VDPRD,*R1+   	* Read byte from VDP RAM
  	DEC  R2            	* Byte counter
  	JNE  VMBRLP        	* Check if finished
  	B	*R11
*// VMBR


*********************************************************************
*
* VDP Write To Register
*
* R0 MSB	VDP register to write to
* R0 LSB	Value to write
*
VWTR   MOVB @R0LB,@VDPWA  	* Send low byte (value) to write to VDP register
  	ORI  R0,>8000      	* Set up a VDP register write operation (10)
  	MOVB R0,@VDPWA     	* Send high byte (address) of VDP register
  	B	*R11
*// VWTR


**
* Standard Character Set 1 - "Space" 8x8
*
SCS1
  	DATA >0000,>0000,>0000,>0000   	;   0 >00
  	DATA >7C82,>AA82,>BA44,>3800   	;   1 >01
  	DATA >7C92,>92FE,>BA44,>3800   	;   2 >02
  	DATA >6CFE,>FEFE,>7C38,>1000   	;   3 >03
  	DATA >1038,>7CFE,>7C38,>1000   	;   4 >04
  	DATA >3838,>D6FE,>D610,>3800   	;   5 >05
  	DATA >1038,>7CFE,>FE92,>3800   	;   6 >06
  	DATA >0038,>7C7C,>7C38,>0000   	;   7 >07
  	DATA >FEC6,>8282,>82C6,>FE00   	;   8 >08
  	DATA >0038,>4444,>4438,>0000   	;   9 >09
  	DATA >FEC6,>BABA,>BAC6,>FE00   	;  10 >0A
  	DATA >0E06,>0A7C,>C6C6,>7C00   	;  11 >0B
  	DATA >7CC6,>C67C,>107C,>1000   	;  12 >0C
  	DATA >0C0C,>0C0C,>0C38,>3000   	;  13 >0D
  	DATA >3E36,>3636,>E6DC,>1800   	;  14 >0E
  	DATA >0155,>2955,>2955,>01FF   	;  15 >0F
  	DATA >0060,>787E,>7860,>0000   	;  16 >10
  	DATA >000C,>3CFC,>3C0C,>0000   	;  17 >11
  	DATA >187E,>1818,>1818,>7E18   	;  18 >12
  	DATA >6666,>6666,>6600,>6600   	;  19 >13
  	DATA >7ED6,>D6D6,>7616,>1600   	;  20 >14
  	DATA >7EC0,>FCC6,>7E06,>FC00   	;  21 >15
  	DATA >0000,>007E,>7E00,>0000   	;  22 >16
  	DATA >1038,>7C00,>7C38,>10FE   	;  23 >17
  	DATA >0010,>387C,>FE00,>0000   	;  24 >18
  	DATA >0000,>FE7C,>3810,>0000   	;  25 >19
  	DATA >1018,>1C1E,>1C18,>1000   	;  26 >1A
  	DATA >0818,>3878,>3818,>0800   	;  27 >1B
  	DATA >0000,>00C0,>C0C0,>7E00   	;  28 >1C
  	DATA >0028,>6CEE,>6C28,>0000   	;  29 >1D
  	DATA >0000,>1038,>7CFE,>0000   	;  30 >1E
  	DATA >0000,>00FE,>7C38,>1000   	;  31 >1F
  	DATA >0000,>0000,>0000,>0000   	;  32 >20
  	DATA >3030,>3030,>3000,>3000   	;  33 >21 !
  	DATA >6C6C,>2800,>0000,>0000   	;  34 >22 "
  	DATA >50F8,>50F8,>5000,>0000   	;  35 >23 #
  	DATA >7CD6,>D07C,>16D6,>7C00   	;  36 >24 $
  	DATA >3256,>6C18,>366A,>4C00   	;  37 >25 %
  	DATA >386C,>3864,>C6C6,>7E00   	;  38 >26 &
  	DATA >1818,>3000,>0000,>0000   	;  39 >27 '
  	DATA >1060,>C0C0,>C060,>1000   	;  40 >28 (
  	DATA >100C,>0606,>060C,>1000   	;  41 >29 )
  	DATA >0054,>38FE,>3854,>0000   	;  42 >2A *
  	DATA >0018,>187E,>1818,>0000   	;  43 >2B +
  	DATA >0000,>0000,>0018,>1830   	;  44 >2C ,
  	DATA >0000,>007C,>0000,>0000   	;  45 >2D -
  	DATA >0000,>0000,>0018,>1800   	;  46 >2E .
  	DATA >0006,>0C18,>3060,>0000   	;  47 >2F /
  	DATA >7CC6,>C6D6,>C6C6,>7C00   	;  48 >30 0
  	DATA >1838,>1818,>1818,>7E00   	;  49 >31 1
  	DATA >7CC6,>061C,>70C0,>FE00   	;  50 >32 2
  	DATA >7CC6,>063C,>06C6,>7C00   	;  51 >33 3
  	DATA >0E1E,>3666,>C6FE,>0600   	;  52 >34 4
  	DATA >FEC0,>C0FC,>0606,>FC00   	;  53 >35 5
  	DATA >7CC6,>C0FC,>C6C6,>7C00   	;  54 >36 6
  	DATA >FE0C,>187C,>3030,>3000   	;  55 >37 7
  	DATA >7CC6,>C67C,>C6C6,>7C00   	;  56 >38 8
  	DATA >7CC6,>C67E,>06C6,>7C00   	;  57 >39 9
  	DATA >0018,>1800,>1818,>0000   	;  58 >3A :
  	DATA >0018,>1800,>1818,>1000   	;  59 >3B ;
  	DATA >0C18,>3060,>3018,>0C00   	;  60 >3C <
  	DATA >0000,>7C00,>7C00,>0000   	;  61 >3D =
  	DATA >6030,>180C,>1830,>6000   	;  62 >3E >
  	DATA >3C46,>060C,>1800,>1800   	;  63 >3F ?
  	DATA >3C46,>D6D6,>DEC0,>7C00   	;  64 >40 @
  	DATA >386C,>C6C6,>FEC6,>C600   	;  65 >41 A
  	DATA >FCC6,>C6FC,>C6C6,>FC00   	;  66 >42 B
  	DATA >7CC6,>C0C0,>C0C6,>7C00   	;  67 >43 C
  	DATA >FCC6,>C6C6,>C6C6,>FC00   	;  68 >44 D
  	DATA >FEC0,>C0F8,>C0C0,>FE00   	;  69 >45 E
  	DATA >FEC0,>C0F8,>C0C0,>C000   	;  70 >46 F
  	DATA >7CC6,>C0DE,>C6C6,>7C00   	;  71 >47 G
  	DATA >C6C6,>C6FE,>C6C6,>C600   	;  72 >48 H
  	DATA >3C18,>1818,>1818,>3C00   	;  73 >49 I
  	DATA >1E06,>0606,>06C6,>7C00   	;  74 >4A J
  	DATA >C6CC,>D8F0,>D8CC,>C600   	;  75 >4B K
  	DATA >6060,>6060,>6060,>7E00   	;  76 >4C L
  	DATA >C6EE,>FED6,>D6C6,>C600   	;  77 >4D M
  	DATA >C6E6,>F6DE,>CEC6,>C600   	;  78 >4E N
  	DATA >7CC6,>C6C6,>C6C6,>7C00   	;  79 >4F O
  	DATA >FCC6,>C6C6,>FCC0,>C000   	;  80 >50 P
  	DATA >7CC6,>C6C6,>D6CC,>7606   	;  81 >51 Q
  	DATA >FCC6,>C6C6,>FCC6,>C600   	;  82 >52 R
  	DATA >7CC6,>C07C,>06C6,>7C00   	;  83 >53 S
  	DATA >7E18,>1818,>1818,>1800   	;  84 >54 T
  	DATA >C6C6,>C6C6,>C6C6,>7C00   	;  85 >55 U
  	DATA >C6C6,>C6C6,>C66C,>3800   	;  86 >56 V
  	DATA >C6C6,>D6D6,>D6EE,>C600   	;  87 >57 W
  	DATA >C6C6,>6C38,>6CC6,>C600   	;  88 >58 X
  	DATA >6666,>663C,>1818,>1800   	;  89 >59 Y
  	DATA >FE0C,>187C,>3060,>FE00   	;  90 >5A Z
  	DATA >1E18,>1818,>1818,>181E   	;  91 >5B [
  	DATA >0060,>3018,>0C06,>0000   	;  92 >5C \
  	DATA >7818,>1818,>1818,>1878   	;  93 >5D ]
  	DATA >1038,>6CC6,>0000,>0000   	;  94 >5E ^
  	DATA >0000,>0000,>0000,>00FF   	;  95 >5F _
  	DATA >1818,>0C00,>0000,>0000   	;  96 >60 `
  	DATA >0000,>7C06,>7EC6,>7E00   	;  97 >61 a
  	DATA >C0C0,>FCC6,>C6C6,>FC00   	;  98 >62 b
  	DATA >0000,>7CC6,>C0C6,>7C00   	;  99 >63 c
  	DATA >0606,>7EC6,>C6C6,>7E00   	; 100 >64 d
  	DATA >0000,>7CC6,>FEC0,>7C00   	; 101 >65 e
  	DATA >3C62,>60FC,>6060,>6000   	; 102 >66 f
  	DATA >0000,>7CC6,>C67E,>067C   	; 103 >67 g
  	DATA >C0C0,>FCC6,>C6C6,>C600   	; 104 >68 h
  	DATA >1800,>3818,>1818,>1800   	; 105 >69 i
  	DATA >0C00,>1C0C,>0C0C,>8C78   	; 106 >6A j
  	DATA >C0C0,>C6DC,>F0DC,>C600   	; 107 >6B k
  	DATA >3818,>1818,>1818,>1800   	; 108 >6C l
  	DATA >0000,>6CFE,>D6D6,>C600   	; 109 >6D m
  	DATA >0000,>7CC6,>C6C6,>C600   	; 110 >6E n
  	DATA >0000,>7CC6,>C6C6,>7C00   	; 111 >6F o
  	DATA >0000,>7CC6,>C6C6,>FCC0   	; 112 >70 p
  	DATA >0000,>7CC6,>C6C6,>7E06   	; 113 >71 q
  	DATA >0000,>7CC6,>C6C0,>C000   	; 114 >72 r
  	DATA >0000,>7EC0,>7C06,>FC00   	; 115 >73 s
  	DATA >3030,>7C30,>3030,>1C00   	; 116 >74 t
  	DATA >0000,>C6C6,>C6C6,>7C00   	; 117 >75 u
  	DATA >0000,>C6C6,>C66C,>3800   	; 118 >76 v
  	DATA >0000,>C6D6,>D6EE,>4400   	; 119 >77 w
  	DATA >0000,>C66C,>386C,>C600   	; 120 >78 x
  	DATA >0000,>C6C6,>C67E,>067C   	; 121 >79 y
  	DATA >0000,>FE0C,>3860,>FE00   	; 122 >7A z
  	DATA >1C30,>3060,>3030,>1C00   	; 123 >7B {
  	DATA >1818,>1818,>1818,>1818   	; 124 >7C |
  	DATA >7018,>180C,>1818,>7000   	; 125 >7D }
  	DATA >7099,>0E00,>0000,>0000   	; 126 >7E ~
  	DATA >0000,>1028,>44FE,>0000   	; 127 >7F
SCS1E


* -- Map Row 0 --
MAP6  DATA >6969,>6360,>6070,>7070	;
  	DATA >6060,>6360,>6063,>6070	;
  	DATA >696B,>6970,>6060,>6360	;
  	DATA >6868,>6060,>706E,>696E	;
  	DATA >6E69,>6B6B,>7060,>6060	;
  	DATA >6060,>6069,>6969,>7060	;
  	DATA >6060,>6063,>6070,>6B68	;
  	DATA >6C68,>686E,>6868,>686B	;
  	DATA >6060,>6069,>696E,>696B	;
  	DATA >6969,>686B,>6B68,>6868	;
* -- Map Row 1 --                   	
  	DATA >6970,>6060,>6360,>6060	;
  	DATA >606C,>6C6C,>6C6C,>6060	;
  	DATA >7070,>7060,>6060,>6868	;
  	DATA >6868,>6868,>6070,>6B69	;
  	DATA >6969,>6E69,>6063,>6060	;
  	DATA >6063,>6069,>6969,>6060	;
  	DATA >6360,>6060,>6060,>7070	;
  	DATA >7070,>7070,>686B,>686E	;
  	DATA >6868,>6969,>6969,>6969	;
  	DATA >6969,>6870,>7070,>7070	;
* -- Map Row 2 --                   	
  	DATA >6963,>6060,>6060,>6063	;
  	DATA >606C,>6C6C,>6C6C,>6063	;
  	DATA >6060,>6063,>6063,>6870	;
  	DATA >6868,>7068,>6060,>6E68	;
  	DATA >6B6B,>6969,>6060,>6063	;
  	DATA >6060,>6070,>6969,>6060	;
  	DATA >6060,>6060,>6060,>6060	;
  	DATA >6060,>6060,>7070,>7068	;
  	DATA >6B6E,>6869,>696B,>6969	;
  	DATA >7070,>7060,>6060,>6360	;
* -- Map Row 3 --                   	
  	DATA >6960,>6969,>6969,>6968	;
  	DATA >6868,>6868,>6868,>6868	;
  	DATA >686C,>6868,>6860,>6860	;
  	DATA >7070,>6068,>6060,>706B	;
  	DATA >6E68,>6970,>6060,>6868	;
  	DATA >6860,>6060,>7069,>6060	;
  	DATA >6868,>6C68,>6868,>6860	;
  	DATA >6060,>6060,>6060,>6070	;
  	DATA >7070,>6969,>6969,>7070	;
  	DATA >6060,>6063,>6868,>6868	;
* -- Map Row 4 --                   	
  	DATA >6960,>7070,>6969,>6969	;
  	DATA >686C,>686C,>6868,>686C	;
  	DATA >6C68,>6868,>6860,>6868	;
  	DATA >6868,>6868,>6060,>6070	;
  	DATA >686B,>7060,>6868,>6868	;
  	DATA >6868,>6060,>6070,>6063	;
  	DATA >6868,>6868,>6868,>6860	;
  	DATA >6060,>6363,>6060,>6063	;
  	DATA >6060,>7069,>6970,>6063	;
  	DATA >6068,>6868,>6868,>6868	;
* -- Map Row 5 --                   	
  	DATA >6969,>6060,>7070,>7070	;
  	DATA >686C,>7070,>7070,>7070	;
  	DATA >7070,>7068,>6860,>7070	;
  	DATA >7070,>7070,>6060,>6060	;
  	DATA >6E6B,>6060,>6868,>686C	;
  	DATA >6868,>6063,>6360,>6060	;
  	DATA >6868,>7070,>7068,>6C60	;
  	DATA >6360,>6060,>6060,>6060	;
  	DATA >6060,>6070,>7060,>6060	;
  	DATA >6868,>6868,>686C,>6868	;
* -- Map Row 6 --                   	
  	DATA >6969,>696E,>6E69,>6960	;
  	DATA >686C,>6868,>6863,>6063	;
  	DATA >6060,>6368,>6868,>6868	;
  	DATA >6C6C,>6C68,>6863,>6060	;
  	DATA >6B6E,>6068,>6C6C,>6C68	;
  	DATA >6868,>686F,>6F6F,>6F68	;
  	DATA >6868,>6060,>6068,>6860	;
  	DATA >6060,>6868,>6868,>6868	;
  	DATA >6060,>6360,>6060,>6360	;
  	DATA >6868,>6868,>6C68,>6868	;
* -- Map Row 7 --                   	
  	DATA >6969,>6969,>6B70,>7060	;
  	DATA >686C,>6C68,>6868,>6868	;
  	DATA >6868,>6868,>6868,>6868	;
  	DATA >6868,>686C,>6C60,>6060	;
  	DATA >696B,>6068,>6C68,>686C	;
  	DATA >6868,>686A,>6A6A,>6A68	;
  	DATA >6C68,>6363,>6068,>6C63	;
  	DATA >6060,>686C,>6868,>6868	;
  	DATA >6868,>6868,>6868,>6868	;
  	DATA >6868,>6868,>6868,>6868	;
* -- Map Row 8 --                   	
  	DATA >6969,>6868,>7060,>6060	;
  	DATA >7070,>7068,>686C,>6C6C	;
  	DATA >6868,>6868,>686C,>6870	;
  	DATA >7070,>7068,>6860,>6060	;
  	DATA >706B,>6068,>6C68,>6868	;
  	DATA >7070,>7070,>7171,>7070	;
  	DATA >7070,>6063,>6068,>6860	;
  	DATA >6060,>6868,>6868,>6868	;
  	DATA >6868,>6868,>6868,>6868	;
  	DATA >6868,>6868,>686C,>6868	;
* -- Map Row 9 --                   	
  	DATA >6968,>6868,>6060,>6060	;
  	DATA >6060,>6068,>6C6C,>6870	;
  	DATA >6C68,>7070,>7070,>7060	;
  	DATA >6060,>6068,>6860,>6060	;
  	DATA >6070,>6068,>6C68,>6868	;
  	DATA >6360,>6060,>6060,>6060	;
  	DATA >6060,>6060,>6068,>6868	;
  	DATA >6868,>686C,>6868,>6868	;
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >686C,>6868,>6868,>6868	;
* -- Map Row 10 --                  	
  	DATA >6868,>9F9D,>6868,>6C68	;
  	DATA >6868,>686C,>6C70,>7060	;
  	DATA >6C68,>6360,>6063,>6060	;
  	DATA >6060,>6368,>6C60,>6060	;
  	DATA >6060,>6070,>7070,>6C6C	;
  	DATA >6060,>6360,>6060,>6063	;
  	DATA >6060,>6360,>6068,>686C	;
  	DATA >6868,>6868,>6868,>6868	;
  	DATA >6060,>6060,>6060,>6060	;
  	DATA >6868,>6868,>6868,>6868	;
* -- Map Row 11 --                  	
  	DATA >6868,>9E9C,>686C,>6868	;
  	DATA >6868,>6868,>6863,>6063	;
  	DATA >6C68,>6060,>6060,>6063	;
  	DATA >6060,>6068,>6C68,>6868	;
  	DATA >6C68,>6868,>6860,>686C	;
  	DATA >6060,>6060,>6063,>6060	;
  	DATA >6060,>6060,>606C,>6868	;
  	DATA >6868,>7070,>6868,>7070	;
  	DATA >6060,>6060,>6060,>6060	;
  	DATA >686C,>7070,>7070,>6C6C	;
* -- Map Row 12 --                  	
  	DATA >6868,>696D,>7070,>7070	;
  	DATA >7070,>7070,>7060,>6060	;
  	DATA >6C68,>6060,>6060,>6060	;
  	DATA >6060,>6068,>6C68,>6868	;
  	DATA >686C,>686C,>6C68,>686C	;
  	DATA >6C68,>6868,>6868,>6868	;
  	DATA >6868,>6868,>6068,>6868	;
  	DATA >6868,>6060,>6868,>6060	;
  	DATA >6868,>686C,>6868,>6860	;
  	DATA >6868,>6060,>6060,>7070	;
* -- Map Row 13 --                  	
  	DATA >6869,>6B6C,>6060,>6060	;
  	DATA >6060,>6360,>6360,>6063	;
  	DATA >6868,>6360,>696B,>6969	;
  	DATA >696E,>6068,>6C70,>7070	;
  	DATA >7070,>7068,>686C,>6868	;
  	DATA >6C68,>6868,>6868,>6868	;
  	DATA >6868,>6868,>6070,>7070	;
  	DATA >6868,>6060,>6868,>6868	;
  	DATA >6868,>6868,>6868,>6860	;
  	DATA >6C68,>6060,>6060,>6060	;
* -- Map Row 14 --                  	
  	DATA >6869,>696B,>6060,>6060	;
  	DATA >6368,>6868,>6868,>6868	;
  	DATA >686C,>6060,>6B69,>6990	;
  	DATA >6969,>606C,>6C60,>6063	;
  	DATA >6063,>6070,>7070,>7070	;
  	DATA >7070,>7070,>7070,>7068	;
  	DATA >6868,>6868,>6868,>6860	;
  	DATA >6868,>6060,>6868,>6868	;
  	DATA >6868,>6868,>6868,>6860	;
  	DATA >686C,>6060,>6068,>6868	;
* -- Map Row 15 --                  	
  	DATA >6969,>6969,>6060,>6360	;
  	DATA >6068,>6868,>6868,>6868	;
  	DATA >6868,>6060,>6B69,>6886	;
  	DATA >6869,>6368,>6860,>6868	;
  	DATA >6868,>6868,>6860,>6068	;
  	DATA >6868,>686C,>6860,>6068	;
  	DATA >6868,>6868,>6868,>6860	;
  	DATA >6868,>6060,>7070,>7068	;
  	DATA >6870,>7070,>7070,>7060	;
  	DATA >6868,>6060,>6068,>6868	;
* -- Map Row 16 --                  	
  	DATA >6969,>6B69,>6060,>6060	;
  	DATA >6068,>686C,>6870,>7068	;
  	DATA >6868,>6063,>6968,>6868	;
  	DATA >6869,>6068,>6860,>6C68	;
  	DATA >6C68,>686C,>6860,>6368	;
  	DATA >6868,>6868,>6860,>6070	;
  	DATA >7070,>7070,>7070,>7060	;
  	DATA >6868,>6060,>6868,>6868	;
  	DATA >6860,>6060,>6060,>6060	;
  	DATA >6868,>6060,>6068,>6870	;
* -- Map Row 17 --                  	
  	DATA >6969,>6969,>6063,>6060	;
  	DATA >6068,>6C68,>6860,>6068	;
  	DATA >6C70,>6060,>6E68,>6868	;
  	DATA >6868,>6368,>6C63,>6868	;
  	DATA >7070,>7070,>7060,>606C	;
  	DATA >6870,>686C,>6860,>6868	;
  	DATA >6868,>6868,>6868,>6868	;
  	DATA >6868,>6060,>6868,>6868	;
  	DATA >6860,>6068,>686C,>6868	;
  	DATA >6C68,>6069,>6968,>6868	;
* -- Map Row 18 --                  	
  	DATA >6969,>6B6B,>6060,>6060	;
  	DATA >6368,>6868,>6860,>6368	;
  	DATA >6C60,>6360,>7070,>7068	;
  	DATA >6870,>6068,>6860,>6868	;
  	DATA >6060,>6060,>6063,>6068	;
  	DATA >6C60,>6868,>6860,>6868	;
  	DATA >6868,>6868,>6868,>6868	;
  	DATA >6868,>6060,>6868,>7070	;
  	DATA >7060,>606C,>6868,>6C68	;
  	DATA >686C,>6069,>6968,>6868	;
* -- Map Row 19 --                  	
  	DATA >6969,>6E6E,>6960,>6063	;
  	DATA >6068,>686C,>6C63,>6068	;
  	DATA >6860,>6969,>6969,>6068	;
  	DATA >6863,>6068,>6860,>686C	;
  	DATA >6868,>686C,>6860,>6068	;
  	DATA >6C60,>7070,>7060,>6868	;
  	DATA >6870,>7070,>6868,>6C6C	;
  	DATA >6868,>6868,>6868,>6060	;
  	DATA >6060,>6068,>6870,>7070	;
  	DATA >7070,>6069,>6890,>6868	;
* -- Map Row 20 --                  	
  	DATA >6969,>6969,>6E69,>6060	;
  	DATA >6070,>7070,>7063,>6068	;
  	DATA >6C60,>6969,>6969,>6068	;
  	DATA >6868,>6868,>6860,>6868	;
  	DATA >6868,>686C,>6860,>6068	;
  	DATA >6860,>606C,>6C60,>7070	;
  	DATA >7060,>6060,>6868,>6C68	;
  	DATA >6C68,>6868,>6868,>6060	;
  	DATA >6060,>6068,>6C60,>6060	;
  	DATA >6060,>6069,>6886,>6868	;
* -- Map Row 21 --                  	
  	DATA >6969,>696E,>6970,>6060	;
  	DATA >6060,>6360,>6060,>6068	;
  	DATA >6860,>6968,>7E69,>6068	;
  	DATA >6868,>6868,>6863,>7070	;
  	DATA >7070,>686C,>6C68,>6868	;
  	DATA >6868,>6868,>6C6C,>6C68	;
  	DATA >6868,>6868,>6868,>686C	;
  	DATA >6C70,>7070,>7070,>6060	;
  	DATA >6063,>6068,>6868,>6868	;
  	DATA >6860,>6069,>6969,>6969	;
* -- Map Row 22 --                  	
  	DATA >6969,>6969,>6960,>6060	;
  	DATA >6868,>6868,>6868,>6068	;
  	DATA >6C60,>6868,>6869,>6070	;
  	DATA >7070,>7070,>7060,>6360	;
  	DATA >6060,>6868,>686C,>686C	;
  	DATA >6868,>6868,>6868,>6C6C	;
  	DATA >6C6C,>6C6C,>6C68,>686C	;
  	DATA >6C60,>6063,>6060,>6063	;
  	DATA >6060,>6068,>686C,>686C	;
  	DATA >6860,>6069,>6969,>6969	;
* -- Map Row 23 --                  	
  	DATA >6969,>6B69,>6960,>6060	;
  	DATA >686C,>6C6C,>6C6C,>6868	;
  	DATA >6C68,>6868,>6969,>6360	;
  	DATA >6063,>6060,>6360,>6060	;
  	DATA >6060,>7070,>7070,>7070	;
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7060,>6060,>6060,>6060	;
  	DATA >6060,>6068,>6C68,>6868	;
  	DATA >6860,>6070,>7070,>7070	;
* -- Map Row 24 --                  	
  	DATA >6969,>696B,>6969,>6060	;
  	DATA >6868,>7070,>6868,>686C	;
  	DATA >6C68,>6868,>6868,>6069	;
  	DATA >6969,>6969,>696B,>6063	;
  	DATA >6360,>6360,>6060,>6060	;
  	DATA >6360,>6060,>6060,>6068	;
  	DATA >6868,>6868,>6868,>686C	;
  	DATA >6868,>6868,>6868,>6060	;
  	DATA >6360,>6068,>6868,>6868	;
  	DATA >6868,>6860,>6060,>6060	;
* -- Map Row 25 --                  	
  	DATA >6969,>696B,>6D69,>6960	;
  	DATA >686C,>6360,>7070,>7070	;
  	DATA >7070,>7070,>7070,>606B	;
  	DATA >6E6B,>6B69,>6969,>6063	;
  	DATA >6068,>686C,>6868,>6969	;
  	DATA >6969,>6060,>6969,>6968	;
  	DATA >6868,>6C6C,>6C68,>6C6C	;
  	DATA >6C68,>6868,>6868,>6060	;
  	DATA >6060,>6068,>6868,>6C68	;
  	DATA >6868,>6C68,>6C68,>6060	;
* -- Map Row 26 --                  	
  	DATA >6969,>696B,>6C69,>7060	;
  	DATA >6C68,>6060,>6060,>6063	;
  	DATA >6060,>6063,>6060,>6868	;
  	DATA >6869,>6868,>6E69,>6060	;
  	DATA >606C,>6868,>6868,>6868	;
  	DATA >6B69,>6063,>6968,>686C	;
  	DATA >6870,>7070,>7070,>7070	;
  	DATA >7070,>7070,>6868,>6060	;
  	DATA >6060,>6068,>6C68,>686C	;
  	DATA >6868,>6868,>6870,>6060	;
* -- Map Row 27 --                  	
  	DATA >6969,>6E69,>6B70,>6060	;
  	DATA >686C,>6060,>6360,>6060	;
  	DATA >686C,>686C,>6868,>6868	;
  	DATA >6868,>687E,>6969,>6063	;
  	DATA >6068,>6C70,>6868,>686B	;
  	DATA >6E69,>6060,>6868,>686C	;
  	DATA >6860,>6060,>6060,>6060	;
  	DATA >6060,>6060,>6868,>6F6F	;
  	DATA >6F6F,>6868,>6C68,>6868	;
  	DATA >686C,>6870,>7060,>6069	;
* -- Map Row 28 --                  	
  	DATA >6969,>6E69,>6B69,>6969	;
  	DATA >686C,>6060,>6060,>6060	;
  	DATA >6868,>6868,>6868,>6868	;
  	DATA >6868,>6868,>6869,>6063	;
  	DATA >6068,>6860,>6890,>6868	;
  	DATA >7070,>6068,>686C,>6868	;
  	DATA >6960,>6868,>6868,>6868	;
  	DATA >6869,>6960,>6868,>6A6A	;
  	DATA >6A6A,>6868,>6868,>6868	;
  	DATA >686C,>6860,>6069,>696E	;
* -- Map Row 29 --                  	
  	DATA >6969,>696E,>6969,>6969	;
  	DATA >686C,>6063,>6868,>6868	;
  	DATA >6868,>7070,>7070,>6969	;
  	DATA >6868,>6868,>6969,>6363	;
  	DATA >606C,>6860,>6886,>686D	;
  	DATA >6068,>686C,>6868,>6869	;
  	DATA >6960,>6868,>6868,>6868	;
  	DATA >6868,>6960,>7070,>7071	;
  	DATA >7170,>7070,>7068,>6C68	;
  	DATA >6870,>7060,>696B,>6968	;
* -- Map Row 30 --                  	
  	DATA >6969,>6969,>6E6E,>6970	;
  	DATA >686C,>6060,>6868,>6868	;
  	DATA >6868,>6060,>6060,>6969	;
  	DATA >6869,>6969,>6969,>6060	;
  	DATA >6068,>6860,>6868,>6E6C	;
  	DATA >6068,>686C,>6870,>7070	;
  	DATA >7060,>6868,>7070,>6885	;
  	DATA >8468,>6960,>6060,>6060	;
  	DATA >6063,>6060,>6070,>7070	;
  	DATA >7060,>6069,>6968,>6868	;
* -- Map Row 31 --                  	
  	DATA >7070,>7070,>7070,>7060	;
  	DATA >686C,>6060,>6C68,>7070	;
  	DATA >7070,>6060,>6060,>7070	;
  	DATA >7070,>7070,>7070,>6060	;
  	DATA >6068,>6860,>7070,>7070	;
  	DATA >6068,>6870,>7060,>6060	;
  	DATA >6060,>6868,>6360,>6B68	;
  	DATA >6868,>6E60,>6060,>6060	;
  	DATA >6060,>6060,>6060,>6060	;
  	DATA >6060,>6969,>6B68,>6868	;
* -- Map Row 32 --                  	
  	DATA >6060,>6060,>6060,>6060	;
  	DATA >686C,>6060,>6868,>6060	;
  	DATA >606B,>6969,>6868,>6868	;
  	DATA >686B,>6E6B,>6860,>6060	;
  	DATA >6368,>6C60,>6060,>6060	;
  	DATA >606C,>6860,>6868,>6F6F	;
  	DATA >6F6F,>6868,>6060,>6B6B	;
  	DATA >6E6E,>6960,>6360,>6063	;
  	DATA >6360,>6060,>6060,>6060	;
  	DATA >6069,>6968,>6868,>6868	;
* -- Map Row 33 --                  	
  	DATA >6060,>6068,>686C,>6C68	;
  	DATA >6868,>6360,>6C68,>6060	;
  	DATA >606D,>6968,>6868,>6868	;
  	DATA >6868,>686B,>6B60,>6060	;
  	DATA >606C,>6860,>6060,>6868	;
  	DATA >6868,>6860,>6868,>6A6A	;
  	DATA >6A6A,>6868,>6063,>7070	;
  	DATA >7070,>7060,>6060,>6060	;
  	DATA >6060,>6063,>6060,>6069	;
  	DATA >6969,>6E68,>6868,>6C68	;
* -- Map Row 34 --                  	
  	DATA >6060,>6068,>6C6C,>6C68	;
  	DATA >6868,>6060,>6868,>6060	;
  	DATA >606C,>6868,>6868,>6868	;
  	DATA >6868,>6E6B,>6B63,>606C	;
  	DATA >6868,>6868,>6868,>686C	;
  	DATA >6868,>6860,>6868,>7071	;
  	DATA >7171,>7070,>6060,>6060	;
  	DATA >6060,>6060,>6360,>6060	;
  	DATA >6060,>6060,>6060,>6969	;
  	DATA >6B6B,>6C68,>6868,>6868	;
* -- Map Row 35 --                  	
  	DATA >6063,>6068,>6870,>7070	;
  	DATA >7070,>6063,>6868,>6060	;
  	DATA >6070,>7070,>7068,>6868	;
  	DATA >7070,>7070,>7060,>6068	;
  	DATA >6868,>6868,>6868,>6C68	;
  	DATA >7070,>7060,>6868,>6060	;
  	DATA >6060,>6060,>6868,>6868	;
  	DATA >6868,>6860,>6060,>6060	;
  	DATA >6060,>6060,>6069,>696B	;
  	DATA >6868,>6868,>6868,>6868	;
* -- Map Row 36 --                  	
  	DATA >6060,>6068,>6C60,>6063	;
  	DATA >6068,>6868,>6868,>6868	;
  	DATA >6868,>6868,>6868,>6868	;
  	DATA >6060,>6060,>6060,>6068	;
  	DATA >6870,>7070,>7070,>6868	;
  	DATA >6060,>6869,>6868,>6868	;
  	DATA >6868,>6868,>6868,>6868	;
  	DATA >6868,>6860,>6063,>6060	;
  	DATA >6060,>6060,>6D6B,>6E68	;
  	DATA >6868,>6868,>6868,>6868	;
* -- Map Row 37 --                  	
  	DATA >6060,>6068,>6860,>6360	;
  	DATA >6068,>6868,>6868,>6868	;
  	DATA >6868,>6868,>6868,>6868	;
  	DATA >6868,>6860,>6063,>606C	;
  	DATA >6860,>6060,>6060,>686C	;
  	DATA >6060,>6869,>6868,>6868	;
  	DATA >6868,>6868,>6868,>7070	;
  	DATA >7068,>6868,>6060,>6060	;
  	DATA >6060,>6969,>6C69,>6868	;
  	DATA >6868,>686B,>6868,>6E69	;
* -- Map Row 38 --                  	
  	DATA >6060,>6068,>6860,>6360	;
  	DATA >6368,>6870,>7070,>7070	;
  	DATA >7070,>7070,>6868,>6868	;
  	DATA >6868,>6868,>6060,>6068	;
  	DATA >686C,>6868,>6868,>6868	;
  	DATA >6060,>6868,>6868,>7070	;
  	DATA >7070,>7068,>6870,>6060	;
  	DATA >6368,>6868,>6860,>6063	;
  	DATA >6069,>696B,>6968,>8081	;
  	DATA >6868,>6868,>6D6B,>696E	;
* -- Map Row 39 --                  	
  	DATA >6063,>6068,>6C6C,>6868	;
  	DATA >6868,>6860,>6060,>6060	;
  	DATA >6060,>6060,>7068,>6868	;
  	DATA >989A,>6868,>6860,>6068	;
  	DATA >686C,>6C68,>686C,>6868	;
  	DATA >6068,>6868,>6868,>6060	;
  	DATA >6060,>6068,>6860,>6060	;
  	DATA >6068,>6868,>6860,>6069	;
  	DATA >6969,>6E69,>6B68,>8283	;
  	DATA >6868,>6B6E,>6C69,>6969	;
* -- Map Row 40 --                  	
  	DATA >6060,>6068,>6C68,>6868	;
  	DATA >6868,>6C60,>6060,>6068	;
  	DATA >696B,>6B60,>6070,>6868	;
  	DATA >999B,>6868,>6863,>6070	;
  	DATA >6B6E,>686D,>686E,>6B70	;
  	DATA >6070,>7070,>7070,>6060	;
  	DATA >6868,>6868,>6863,>6969	;
  	DATA >6968,>6868,>6860,>6069	;
  	DATA >6B69,>6B68,>6868,>6868	;
  	DATA >6D69,>6E69,>6B69,>6969	;
* -- Map Row 41 --                  	
  	DATA >6060,>6070,>7070,>7068	;
  	DATA >6C68,>6860,>6060,>6069	;
  	DATA >6968,>6B60,>6060,>7068	;
  	DATA >6868,>6868,>6860,>6060	;
  	DATA >6B6B,>6E6C,>6E6B,>6B60	;
  	DATA >6060,>6360,>6060,>6868	;
  	DATA >6868,>6868,>6860,>6D68	;
  	DATA >6868,>6868,>7060,>6969	;
  	DATA >696E,>6969,>6B69,>6E6E	;
  	DATA >6C69,>6969,>6969,>6969	;
* -- Map Row 42 --                  	
  	DATA >6060,>6060,>6060,>6068	;
  	DATA >6868,>6860,>6060,>6069	;
  	DATA >6968,>9069,>6960,>6068	;
  	DATA >6868,>6868,>6868,>6860	;
  	DATA >7070,>7070,>7070,>7060	;
  	DATA >6060,>6060,>6060,>6868	;
  	DATA >6868,>6868,>6860,>6C68	;
  	DATA >6868,>6870,>6060,>6969	;
  	DATA >6969,>6B69,>6969,>6969	;
  	DATA >6E69,>696B,>6868,>6868	;
* -- Map Row 43 --                  	
  	DATA >6060,>6060,>6060,>6068	;
  	DATA >6870,>7060,>6060,>6069	;
  	DATA >6868,>8669,>6969,>6070	;
  	DATA >6868,>6868,>6868,>6868	;
  	DATA >6868,>6868,>686C,>6868	;
  	DATA >6C68,>6868,>6868,>6868	;
  	DATA >7070,>7070,>7060,>697E	;
  	DATA >6869,>6960,>6060,>7069	;
  	DATA >696E,>6969,>6969,>6B69	;
  	DATA >6969,>6868,>6868,>6868	;
* -- Map Row 44 --                  	
  	DATA >6360,>6060,>6063,>6068	;
  	DATA >6C68,>6868,>686C,>6C6C	;
  	DATA >686C,>6869,>6969,>6960	;
  	DATA >7070,>7070,>7068,>6868	;
  	DATA >6868,>6868,>6868,>6868	;
  	DATA >6868,>686C,>6868,>6868	;
  	DATA >6060,>6063,>6060,>6968	;
  	DATA >6969,>6960,>6060,>6069	;
  	DATA >696B,>6969,>696B,>6968	;
  	DATA >6868,>6868,>6890,>6868	;
* -- Map Row 45 --                  	
  	DATA >6060,>6060,>6060,>6068	;
  	DATA >6868,>6C68,>6868,>6868	;
  	DATA >686C,>6869,>6969,>6960	;
  	DATA >6060,>6060,>6070,>7070	;
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >7070,>7070,>7070,>7070	;
  	DATA >6063,>6060,>6060,>7070	;
  	DATA >7070,>7060,>6069,>696E	;
  	DATA >6969,>6969,>6968,>6C68	;
  	DATA >6868,>6868,>6886,>6868	;
* -- Map Row 46 --                  	
  	DATA >6060,>6060,>6060,>6070	;
  	DATA >7070,>7070,>6868,>7070	;
  	DATA >7070,>7070,>7070,>7060	;
  	DATA >6063,>6063,>6060,>6060	;
  	DATA >6060,>6060,>6360,>6063	;
  	DATA >6060,>6363,>6360,>6060	;
  	DATA >6069,>6969,>6969,>6060	;
  	DATA >6060,>6060,>6069,>6969	;
  	DATA >6969,>7070,>6868,>6868	;
  	DATA >6868,>6868,>6868,>6868	;
* -- Map Row 47 --                  	
  	DATA >6E60,>6060,>6060,>6060	;
  	DATA >6060,>6060,>6868,>6060	;
  	DATA >6060,>6060,>6060,>6060	;
  	DATA >6060,>6063,>6060,>6060	;
  	DATA >6360,>6060,>6060,>6060	;
  	DATA >6060,>6060,>6060,>6063	;
  	DATA >6969,>6868,>6969,>6960	;
  	DATA >6063,>6069,>6969,>6969	;
  	DATA >6969,>6060,>6868,>6870	;
  	DATA >7070,>7070,>7070,>7070	;
* -- Map Row 48 --                  	
  	DATA >6E6E,>6B63,>6060,>6060	;
  	DATA >6360,>6060,>686C,>6060	;
  	DATA >6360,>6060,>6060,>6360	;
  	DATA >6060,>6060,>6060,>6063	;
  	DATA >6060,>6068,>6C68,>686C	;
  	DATA >6868,>6868,>6C68,>6860	;
  	DATA >6968,>6C68,>6869,>6963	;
  	DATA >6060,>6969,>6969,>6969	;
  	DATA >6970,>6063,>6868,>7060	;
  	DATA >6969,>6969,>6969,>6060	;
* -- Map Row 49 --                  	
  	DATA >6969,>6960,>6060,>6060	;
  	DATA >6060,>6063,>6868,>6060	;
  	DATA >6063,>6868,>6C68,>6868	;
  	DATA >6868,>6860,>6263,>6068	;
  	DATA >6C68,>686C,>6868,>6C68	;
  	DATA >6868,>6C6C,>6868,>6C60	;
  	DATA >6968,>686C,>6C68,>6960	;
  	DATA >6060,>6969,>6969,>7070	;
  	DATA >7060,>6060,>6868,>6060	;
  	DATA >6969,>6868,>6969,>6060	;
* -- Map Row 50 --                  	
  	DATA >6969,>6E60,>6B60,>6060	;
  	DATA >6060,>6060,>6C68,>6360	;
  	DATA >6060,>686C,>6868,>6868	;
  	DATA >6C6C,>6860,>6060,>6068	;
  	DATA >686C,>6868,>6870,>7070	;
  	DATA >7070,>7070,>706C,>6863	;
  	DATA >6968,>6C68,>6868,>6960	;
  	DATA >6060,>6969,>6970,>6060	;
  	DATA >6360,>6060,>7070,>6068	;
  	DATA >6968,>8081,>6869,>6868	;
* -- Map Row 51 --                  	
  	DATA >6B6B,>6E69,>6960,>6360	;
  	DATA >6063,>6060,>6C68,>6C68	;
  	DATA >6868,>6868,>7070,>7070	;
  	DATA >7068,>686C,>6868,>686C	;
  	DATA >6870,>7070,>7060,>6060	;
  	DATA >6060,>6060,>6068,>6860	;
  	DATA >6968,>6868,>6868,>6960	;
  	DATA >6360,>7070,>7060,>6063	;
  	DATA >6060,>6060,>6D60,>6068	;
  	DATA >6969,>6868,>6969,>6868	;
* -- Map Row 52 --                  	
  	DATA >6969,>696E,>6960,>6060	;
  	DATA >6060,>6060,>6868,>686C	;
  	DATA >6868,>6C68,>6060,>6060	;
  	DATA >6068,>6C68,>686C,>6868	;
  	DATA >6860,>6060,>6060,>6063	;
  	DATA >6060,>6360,>6068,>686C	;
  	DATA >686C,>6C68,>6869,>6960	;
  	DATA >6063,>6060,>6060,>6360	;
  	DATA >6063,>6060,>6C60,>6070	;
  	DATA >6969,>6969,>6969,>7070	;
* -- Map Row 53 --                  	
  	DATA >6B69,>696E,>696E,>6B60	;
  	DATA >6060,>6060,>7070,>7070	;
  	DATA >7070,>7070,>6060,>6060	;
  	DATA >6070,>7070,>7070,>7070	;
  	DATA >7060,>6069,>6060,>6060	;
  	DATA >6060,>6060,>6068,>6C68	;
  	DATA >6868,>6868,>6969,>7060	;
  	DATA >6060,>6060,>6360,>6060	;
  	DATA >6060,>6E63,>6B60,>6060	;
  	DATA >7070,>7070,>7070,>6060	; 
MAP6E

  	END

 

 

 

 

Matthew's source code is brilliantly commented, and it still stumps me when I try to read it. I really like the idea of a relatively small viewport... but I'm willing to try anything.

 

Here's the mockup for the zelda-style you suggested

zeldastyle.jpg

 

 

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