Robert M Posted April 17, 2011 Share Posted April 17, 2011 I'm back after a log hiatus from the board. I have been dabbling with an idea that as a community we need to stop reinventing the wheel in our code. I believe that it is possible to assemble a core framework or set of libraries if you will to assist in creating games for the Atari 2600. The goal is to compile a set of useful macros and routines into a package with documentation. Using this package, a programmer can get a project started very quickly. If necessary custom optimizations can be made later in the project. To that end, I have created some macros for bank-switching, and for indexed jumps. I will add more macros and routines as I complete them for my own projects, and others are welcome to contribute their ideas. Below is a list of the macros in the zipped package attached to this post. The attached zip file contains the ARPM files and an example program using some of the macros. ; Macros defined: ; --------------- ; From ARPM_BankSwitch.h: ; ----------------------- ; BS_START_BANK <bank_num> - Declare a new bank and insert common code. ; BS_END_BANK <bank_num> - End a bank image and report space remaining. ; ; JMB <label> - JuMp Bank switched. (Replaces JMP instruction) ; JSB <label> - Jump to Subroutine Bank switched (Replaces JSR) ; RTB <label> - ReTurn from subroutine Bank switched. (Replaces RTS) ; ; From ARPM_IndexedJump.h: ; ------------------------ ; JIT_START <table-name> - Start a new indexed-jump table. ; JIT_ENTRY <address-label> - Add a pointer to the table ; JIT_END <table-name> - Finalize the table into ROM. ; ; JIX <table-name> - Jump Indexed X (ON X GOTO <table-name>) ; JIY <table-name> - Jump Indexed Y (ON Y GOTO <table-name>) ; ; SIX <table-name> - Subroutine Indexed X (ON X GOSUB <table-name>) ; SIY <table-name> - Subroutine Indexed Y (ON Y GOSUB <table-name>) ; ;============================================================================= Future dream features: - A formal TV frame generating label that you can hang kernels off of. - A script driven sound FX and music engine. - Kernels - RAM bit field macros Cheers! Rob ARPM_v1.zip 7 Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted April 17, 2011 Share Posted April 17, 2011 This is a great idea! And welcome back. Michael Quote Link to comment Share on other sites More sharing options...
Ethaniel Posted April 24, 2011 Share Posted April 24, 2011 this i will look after for updates sounds like a great idea for me i always wanted to make a game with minimum programming knowledge Quote Link to comment Share on other sites More sharing options...
Kylearan Posted January 14, 2014 Share Posted January 14, 2014 Very nice set of bankswitching macros, thanks for posting those! Very easy to use. One problem, though: While JSB works, JMB doesn't because of a typo in the file "ARPM_Bankswitch.h" on line 376: ldx #[>[.{1}-1]]>>5 ; Calculate the target bank. Just remove the "." to make it work. Here's the correct line: ldx #[>[{1}-1]]>>5 ; Calculate the target bank. Quote Link to comment Share on other sites More sharing options...
Mr SQL Posted January 15, 2014 Share Posted January 15, 2014 Robert M,awesome project! A programming Framework with reusable class libraries can really streamline the development process. Looking forward to reading more about your Hybrid Framework (macros and routines) as you develop it! You should write a couple of demo examples and games with it as you develop it; this can both flesh out a Framework, adding necessary functionality and also show off the potential to attract developers to use it. I followed this approach with my ASDK Framework and the bB Framework also started this way and then snowballed, incredible games are built with it! Frameworks magically multiply the development time (6 weeks = 6 months of coding easy) which allows the developer to focus on creativity and game awesomeness.Of course this doesn't mean the developer is gauranteed to build an awesome game; ET is an example of a Framework game from back in the day that discouraged subsequent use of the Framework, Will your Framework be free for anyone to use or modify or will you retain some rights to it? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.