Jump to content

Bill Lange

Members
  • Content Count

    1,037
  • Joined

  • Last visited

Everything posted by Bill Lange

  1. I'd like to attach my 800xl to a new tv with S-video IN on the front of it. Has anyone set up this configuration. I'm just tired of my old - yellow Commodore monitor. WRL
  2. For those of you that don't know about the website How Stuff Works, check out this article on How Video Games work. http://www.howstuffworks.com/video-game.htm This is a really cool website that I find myself spending too much time at. WRL
  3. Bill Lange

    C++ Tutor

    #include <iostream.h> class NumOperator { public: [b] int duble (int doubNum); // should double the number [/b] }; int NumOperator::duble(int setnum) { setnum=doubNum*2; return setnum; } This part of your code doesn't contain any data storage. When you do the setnum=doubNum*2, it doesn't know what doubNum is. WRL
  4. Bill Lange

    C++ Tutor

    Inky - try it this way - #include <iostream.h> class NumOperator { public: int number; void duble(void); int getNumber(void); void setNumber(int); }; void NumOperator::duble() { number=number*2; } int NumOperator::getNumber(void) { return number; } void NumOperator::setNumber(int tmp) { number=tmp; } int main () { NumOperator NumOp; int AnyNum; cout << "Type a number: "; cin >> AnyNum; cout << endl; NumOp.setNumber(AnyNum); NumOp.duble(); cout << "Double = " << NumOp.getNumber(); return 0; }
  5. Bill Lange

    C++ Tutor

    The problem isn't really learning it, it's remembering it all when you put on another project for six months were you are not using C++. Then when you come back to C++, you'll be asking yourself "How do I pass a address again?" or "What is the syntax of a contructor?" WRL
  6. Ahhh, the old strobe registers. Strobe means that you just need to write to a register to cause something to happen. It doesn't matter what you write to a strobe register. It can be any value between 0 and 255 decimal or $00 and $FF in hex. You just need to write a value to it. Usually you just write what ever is in the accumulator to the strobe register. It accomplishes the strobe without changing anything including the accumulator. Basically you are just telling it to "wake up". WRL
  7. There isn't a character set built into the Atari 2600 so creating a "Hello World" program isn't a simple example. As DEBRO suggested, take a look at How To Draw A Playfield. I'd also suggest that you do a web search for the Stella Programmer's Guide and read through that a few times. WRL
  8. Yea and my fingers are still smoking!
  9. Joystick routine starts around 1330. Sprite movement is around 2150. 30; 50 *=$5000 60 JMP START 70; 80 RAMTOP=$6A 90 VVBLKD=$0224 0100 SDMCTL=$022F 0110 SDLSTL=$0230 0120 STICK0=$0278 0130 PCOLR0=$02C0 0140 COLOR2=$02C6 0150; 0160 HPOSP0=$D000 0170 GRACTL=$D01D 0180 PACTL=$D302 0190 PMBASE = $D407 0200 SETVBV=$E45C 0210 XITVBV =$E462 0220; 0230 HRZPTR=$0600 0240 VRTPTR=HRZPTR+1 0250 OURBAS=VRTPTR+1 0260 TABSIZ=OURBAS+2 0270 FILVAL=TABSIZ+2 0280; 0290 TABPTR=$B0 0300 TABADR=TABPTR+2 0310; 0315 EYEOFS=$0610 0320 PLBOFS=512 0330 PLTOFS=640 0340; EYE BITMAP DATA 0343 EYES .BYTE $00,$EE,$AA,$EE,00 0345 .BYTE $00,$AA,$EE,$EE,$00 0347 .BYTE $00,$EE,$EE,$AA,$00 0349 .BYTE $00,$EE,$66,$EE,$00 0353 .BYTE $00,$EE,$CC,$EE,$00 0360; 0370 START 0375 LDA #0 0376 STA EYEOFS 0380; 0390; CLEAR SCREEN 0400; 0410 LDA #0 0420 STA FILVAL 0430 LDA SDLSTL 0440 STA TABPTR 0450 LDA SDLSTL+1 0460 STA TABPTR+1 0470 LDA #960&255 0480 STA TABSIZ 0490 LDA #960/256 0500 STA TABSIZ+1 0510 JSR BLKFIL 0520; 0530; 0540; 0550 LDA #0 0560 STA COLOR2 0570 LDA #$FF 0580 STA PCOLR0 0590; 0600 LDA #100 0610 STA HRZPTR 0620 STA HPOSP0 0630; 0640 LDA #48 0650 STA VRTPTR 0660; 0670 LDA #0 0680 STA OURBAS 0690 STA OURBAS+1 0700; 0710 SEC 0720 LDA RAMTOP 0730 SBC #8 0740 STA PMBASE 0750 STA OURBAS+1 0760; 0770 LDA #46 0780 STA SDMCTL 0790; 0800 LDA #3 0810 STA GRACTL 0820; 0830; 0840; 0850 CLC 0860 LDA OURBAS 0870 ADC #PLBOFS&255 0880 STA TABADR 0890 STA TABPTR 0900 LDA OURBAS+1 0910 ADC #PLBOFS/256 0920 STA TABADR+1 0930 STA TABPTR+1 0940; 0950 SEC 0960 LDA #PLTOFS&255 0970 SBC #PLBOFS&255 0980 STA TABSIZ 0990 LDA #PLTOFS/256 1000 SBC #PLBOFS/256 1010 STA TABSIZ+1 1020; 1030 LDA #0 1040 STA FILVAL 1050 JSR BLKFIL 1060; 1070; 1080; 1090 PLAYER 1100; 1110; DRAW PLAYER 1120; 1130 JSR DRAWPL 1140; 1150; 1160; 1170 LDY #INTRPT&255 1180 LDX #INTRPT/256 1190 LDA #7 1200 JSR SETVBV 1210; 1220 INTRPT 1230 LDA #RDSTIK&255 1240 STA VVBLKD 1250 LDA #RDSTIK/256 1260 STA VVBLKD+1 1270; 1280; 1290; 1300 INFIN 1310 JMP INFIN 1320; 1330; READ JOYSTICK 1340; 1350 RDSTIK 1360 LDA #4 1370 ORA PACTL 1380; 1390 LDA STICK0 1400 CMP #$FF 1410 BEQ RETURN 1420; 1430 TRYAGN 1440 CMP #$07 1450 BNE TRYAG2 1452 LDA #$20 1454 STA EYEOFS 1460 LDX HRZPTR 1470 INX 1480 STX HRZPTR 1490 STX HPOSP0 1500 JMP RETURN 1510; 1520 TRYAG2 1530 CMP #$0B 1540 BNE TRYAG3 1550 LDA #$15 1555 STA EYEOFS 1560 LDX HRZPTR 1570 DEX 1580 STX HRZPTR 1590 STX HPOSP0 1600 JMP RETURN 1610; 1620 TRYAG3 1630 CMP #$0D 1640 BNE TRYAG4 1650 LDA #$10 1655 STA EYESOF 1660 INC VRTPTR 1670 JSR DRAWPL 1680 JMP RETURN 1690; 1700 TRYAG4 1710 CMP #$0E; 1720 BNE RETURN 1730 LDA #$5 1735 STA EYEOFS 1740 DEC VRTPTR 1750 JSR DRAWPL 1760 JMP RETURN 1770; 1780 RETURN 1790 JMP XITVBV 1800; 1810; 1820; 1830 BLKFIL 1840; 1850; 1860; 1870 LDA FILVAL 1880 LDX TABSIZ+1 1890 BEQ PARTPG 1900 LDY #0 1910 FULLPG 1920 STA (TABPTR), Y 1930 INY 1940 BNE FULLPG 1950 INC TABPTR+1 1960 DEX 1970 BNE FULLPG 1980; 1990; 2000; 2010 PARTPG 2020 LDX TABSIZ 2030 BEQ FINI 2040 LDY #0 2050; 2060 PARTLP 2070 STA (TABPTR),Y 2080 INY 2090 DEX 2100 BNE PARTLP 2110; 2120 FINI 2130 RTS 2140; 2150 DRAWPL 2160 PHA 2170 CLC 2180 LDA TABADR 2190 ADC VRTPTR 2200 STA TABPTR 2210 LDA TABADR+1 2220 ADC #0 2230 STA TABPTR+1 2240; 2250 LDY EYEOFS 2255 LDX #0 2260 FILLPL 2270 LDA EYES, Y 2280 STA (TABPTR), Y 2290 INY 2295 INX 2300 CPX #5 2310 BCC FILLPL 2320 PLA 2330 RTS WRL
  10. Look what I found at Goodwill today for a $1. Besides the box being all taped up, it doesn't seem like it had been opened before. I also saw a Butterfield book on Machine Language Programming For Commadore Computers, but a $5 it was way out of my price range WRL
  11. As with any book, you will learn something from it, but you will need another reference for the actually machine that you want to program, i.e., the Atari 2600, the Atari 5200, other 8-bit computers. It is full of snippets of code, subroutines and examples. If you want to learn Atari 8-bit 6502, check out www.atariarchives.org WRL
  12. That book will teach you general 6502 assembly such as adding, subtracting and whatnot. It will not teach you how to program the more advanced features of the 2600 or 8-bit computers such as graphics and sound. WRL
  13. Bill Lange

    C++ Tutor

    Instead of You could do this - int rows=0, columns=0, columns2=0; Or better yet - int rows=0; // comments for this var such as use and range int columns=0; // comments for this var such as use and range Also, instead of this - use - cout << endl; Just suggestions. Everyone codes a little different. WRL
  14. Bill Lange

    C++ Tutor

    I'd suggest you just continue on reading the book. There isn't much you can do with the skills that you have learned yet until you know more such as i/o streams, conditional operators, graphics and algorithms. Just keep reading, learning, experimenting and asking questions. WRL
  15. Bill Lange

    C++ Tutor

    In this case, you are passing the VALUES of x and y, not the REFERENCE to x and y. The swap function has it's own LOCAL copy of x and y, but it can't change the values of x and y in main. The x and y in main or not the same variables as the x and y in swap, though they start with the same values. Swap exchanges its x and y values, but it has no effect on the values of x and y in main. When you get to the second cout in main, main's x and y are still x=5 and y=10. For swap to change the values of the x and y in main, you would have to pass the memory address of main's x and y. WRL
  16. Or each time she said "I'm 'Maureen McCormick '" Like anyone living in the United States since 1970 doesn't know who she is! WRL
  17. Good point. I forgot that Atari BASIC handles strings quite differently then other (normal) BASIC langauges. Atari BASIC doesn't implement string arrays. In Atari BASIC, you do something like this DIM Days$(45) Days$="MONDAY TUESDAY WEDNESDAYTHURSDAY FRIDAY " You have to parse it out yourself. Other BASIC implement it like this DIM Days$(5) Days$(1)="MONDAY" . . . Days$(5)="FRIDAY" Much easier! WRL
  18. Bill Lange

    C++ Tutor

    Pointers and references usually stump first time C/C++ programmers. They are not to hard to understand. In addition to reading the books, try experimenting with the code to see what errors and results you get. Pointers and references are just ways to examine/change memory. Classes are just a ways to combine or ENCAPSULATE variables/data and the functions that work on those variables/data. Just keep reading those books, experimenting and asking questions. It's not as hard as people think. Millions of people write code and you can too. WRL
  19. The DIM statement just allocates memory for variables. For example: 10 DIM SomeString$(20) This would put aside enough memory for 20 characters in memory. In Atari Basic, this is probably the statement you need to understand the most if you plan on learning assembly langage. In assembly language, you are always putting aside memory, copying memory .... Another way to explain it is to image your computers memory like an egg carton and there are only 12 memory locations (not unlike a 2600). If you DIM 8 of those locations, only four locations are availabe for something else. WRL
  20. If you want to learn Atari Console programming, why not start with Atari BASIC on the Atari800win Plus emulator? You can learn Basic as well as the in's and out's of the "Atari". You be that much more ready for Atari Assember when the time comes. By looking at the Age Poll that was here a while back, thats probably what most of us learned to program with back in the early 80's. WRL
  21. Bill Lange

    C++ Tutor

    C++ is relatively easy to learn. If you have a book such as C++ for Dummies or C++ in 21 Days you should have a problem. You can even get free C++ compilers on the web. There are plenty of programmers who frequent this site, so start reading, experimenting and post questions when you have them. WRL
  22. Curt - Congradulations on your 15 minutes of fame. I found it interesting that three of the houses that were presented are here in Colorado. My girlfriend kept asking me why I was watching that show ... until Atari popped up at the end. :-) WRL
  23. I'm looking for a copy of OSS MAC/65. If someone has a copy of it in .atr format, can you please email it to me. Thanks Bill
  24. After seeing Ultima I on a friends Apple II, I couldn't wait for it to come out for the Atari. He's still waiting for Star Raiders to come out for the Apple II. I finished U1-U4. I think I started U5, but never finished as life started to get in the way. U3 was my fav ... ah the summer of '83. WRL
  25. Thelen Looks good. I was working on a similar project earlier this year. I have a MS Word version of the 2600 manual upgraded for the 8-bit machines if your interested in it. WRL
×
×
  • Create New...