{"assets":[{"original":"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2013\/09\/mld45-hello-300x237.png","local":"\/data\/posts\/2013\/09\/43733ec92078a94c21694ca48f8edefb.png"},{"original":"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2013\/09\/minild45-interact-300x237.png","local":"\/data\/posts\/2013\/09\/55f56617760e5960842c352cfe6cb64b.png"},{"original":"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2013\/09\/minild45-tiles-300x237.png","local":"\/data\/posts\/2013\/09\/d6d136533d65adc6aa0905d8764fb51f.png"}],"author_link":"author\/ricardo-nakamura\/","author_name":"rinaka","cat":"MiniLD","categories":["MiniLD"],"comments":[],"epoch":1379751720,"event":"LD27","likes":6,"metadata":{"p_key":"79359","p_author":"rinaka","p_authorkey":"0","p_urlkey":"288370","p_title":"My MSX experiments for Mini-LD 45","p_cat":"MiniLD","p_event":"LD27","p_time":"1379751720","p_likes":"6","p_comments":"0","p_status":"WAYBACK","us_key":null,"us_name":null,"us_username":null,"event_start":"1377216000","event_key":"18","event_name":"LD27"},"source_url":"2013\/09\/21\/my-msx-experiments-for-mini-ld-45\/","text":"<p>I started learning to program on the MSX. Back in the day I mixed BASIC and some assembly code with the aid of the trusty MSX Red Book. So for this Mini-LD I decided to go back to it and try to make something in pure assembly language. I am using <a href=\"http:\/\/www.nongnu.org\/z80asm\/index.html\" target=\"_blank\">z80asm<\/a> to build the \u201ccartridge\u201d binary and <a href=\"http:\/\/openmsx.sourceforge.net\/\" target=\"_blank\">OpenMSX<\/a> to run it.\u00a0After so much time, I really needed help to remember things like memory organization, BIOS calls etc. I found very helpful information at the\u00a0<a href=\"http:\/\/map.grauw.nl\/\" target=\"_blank\" title=\"MSX Assembly Pages\">MSX Assembly Pages<\/a>\u00a0and the\u00a0<a href=\"http:\/\/msx.hansotten.com\/\" target=\"_blank\">MSX Info Pages<\/a>.<\/p>\n<p>I have set up a GitHub repository with the source code of my experiments and hopefully, the full game if I get to it:<\/p>\n<p><a href=\"https:\/\/github.com\/rinaka\/rinaka_minild45\">https:\/\/github.com\/rinaka\/rinaka_minild45<\/a><\/p>\n<p>My first \u201cexperiment\u201d was the good old \u201cHello, World!\u201d program (hello.asm). In this case it also loops receiving text input and displaying it on-screen. Nothing fancy, but good enough to test the tools setup and information about the cartridge header.<\/p>\n<p><a href=\"http:\/\/www.ludumdare.com\/compo\/2013\/09\/21\/my-msx-experiments-for-mini-ld-45\/mld45-hello\/\" rel=\"attachment wp-att-297105\"><img alt=\"mld45-hello\" class=\"alignnone size-medium wp-image-297105\" height=\"237\" src=\"\/data\/posts\/2013\/09\/43733ec92078a94c21694ca48f8edefb.png\" width=\"300\"\/><\/a><\/p>\n<p>The second experiment involved switching to graphics mode, setting up a sprite, and moving it with the cursor keys (interact.asm). Main loop timing is achieved in a crude way: since the video display processor generates an interrupt at 50Hz or 60Hz (depending on the system),\u00a0I simply use an HALT instruction at the end of the loop step. It is funny to think that I can get away with it since the machine is dedicated to running a single program. It is also a joy not to have to worry about word alignment, large memory spaces etc.<\/p>\n<p><a href=\"http:\/\/www.ludumdare.com\/compo\/2013\/09\/21\/my-msx-experiments-for-mini-ld-45\/minild45-interact\/\" rel=\"attachment wp-att-297106\"><img alt=\"minild45-interact\" class=\"alignnone size-medium wp-image-297106\" height=\"237\" src=\"\/data\/posts\/2013\/09\/55f56617760e5960842c352cfe6cb64b.png\" width=\"300\"\/><\/a><\/p>\n<p>In the third experiment I tried to use a technique that, if I remember well, was common in MSX games: using part of the character table as a tile set to build the game levels, in 32\u00d724 text mode. Each group of 8 characters can have a different combination of two colors. Storing a room map this way is probably not a good idea as it takes 768 bytes. I am thinking of either doing some simple compression or using less tiles per room\u2026<\/p>\n<p><a href=\"http:\/\/www.ludumdare.com\/compo\/2013\/09\/21\/my-msx-experiments-for-mini-ld-45\/minild45-tiles\/\" rel=\"attachment wp-att-297107\"><img alt=\"minild45-tiles\" class=\"alignnone size-medium wp-image-297107\" height=\"237\" src=\"\/data\/posts\/2013\/09\/d6d136533d65adc6aa0905d8764fb51f.png\" width=\"300\"\/><\/a><\/p>\n<p>So far, that is all I have\u2026 It has been a lot of fun to make, due to the fond memories brought back by this. I will not have much of my weekend available for the jam, but I will try to submit a small, complete game\u2026<\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>","time":"September 21st, 2013 8:22 am","title":"My MSX experiments for Mini-LD 45","title_was_empty":false}