decle Posted November 17, 2016 Share Posted November 17, 2016 (edited) How long does it take to port 200 lines from one assembler to another? Well, for me, just short of 15 years would seem to be the answer. I first found Killer Bees, David Rolfe's trivial Intellivision game, early in 2002, as noted here: https://groups.io/g/intvprog/message/981 Having rediscovered it a couple of days ago, thanks to Joe, I figured it had to be doable. It's less than 200 lines right? How hard could it be? Well it proved to be tougher than I thought (the bit I found hard was locating the EXEC entry point for DETSTPOB). So here it is: killerbees.asm an annotated version of Killer Bees that assembles under as1600. Enjoy! decle 2019-12 - unfortunately Yahoo started to sunset Groups at the end of 2019, which seems to have resulted in intvprog no longer being searchable, and the original conversation being lost. David Rolfe's Earthlink page also seems to have been taken down. Happily, unlike IntvProg, this can still be found on the Wayback machine here: https://web.archive.org/web/20041113102531/http://home.earthlink.net/~davidrolfe/trivia.htm 2021-06 - Good news! intvprog seems to have been archived on groups.io and so the link to the original conversation between @intvnut and myself above has been restored (at least for now). Edited June 25, 2021 by decle Restored link to David Rolfe's original page and intvprog 4 Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted November 17, 2016 Share Posted November 17, 2016 Heres the ROM and the source code with CR and LF line endings :- killerbees.asm killerbees.rom 2 Quote Link to comment Share on other sites More sharing options...
decle Posted November 17, 2016 Author Share Posted November 17, 2016 And here is a dictionary I put together of EXEC entry points I turned up, with DOS line endings This cross references the names and addresses within dis1600 (taken from exec_interp.c) with the names found in Your Friend the EXEC and addresses inferred from my poking around a disassembly of the EXEC. The YFTE entries should probably be viewed as tentative unless they are found in Killer Bees execentry.txt Cheers decle 1 Quote Link to comment Share on other sites More sharing options...
nanochess Posted November 17, 2016 Share Posted November 17, 2016 And here is an animated GIF showing it. 3 Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted November 18, 2016 Share Posted November 18, 2016 And here is a dictionary I put together of EXEC entry points I turned up, with DOS line endings This cross references the names and addresses within dis1600 (taken from exec_interp.c) with the names found in Your Friend the EXEC and addresses inferred from my poking around a disassembly of the EXEC. The YFTE entries should probably be viewed as tentative unless they are found in Killer Bees execentry.txt Cheers decle Here's one I had put together after reverse-engineering World Series Baseball. It is a "constants" file compatible that can be imported to an as1600 source. I haven't cross-referenced both to see if there are any discrepancies. I suspect yours is more comprehensive. I reconstructed this one based on a disassembly of the source and information gleaned from the "Your Friend The EXEC" document. I include also a set of macros I reverse-engineered based on that document, but I'm afraid I didn't complete them. They may help someone else's efforts. -dZ. symtbl.asm macro.txt 2 Quote Link to comment Share on other sites More sharing options...
decle Posted November 18, 2016 Author Share Posted November 18, 2016 Hey dZ, This is very cool. A symbol table is a much more sensible way of enumerating this information . I've taken the liberty of stripping the EXEC entry points from symtbl.asm, adding in the YFTE names (starting with Y_ rather than X_ to make them easy to spot) and sorting them into the same order as YFTE. This is the result: execentry.asm Looking through the symtbl.asm addresses they all matched up with those from dis1600 and the ones I found. I've added all the functions mentioned in appendix E of YFTE. Where an address is not known I've commented the symbol out with an address of $UNKNOWN. It appears we are a little over half way to having all the documented entry points. Of the 109 functions described in YFTE addresses are defined for 69. Cheers decle 1 Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted November 18, 2016 Share Posted November 18, 2016 Hey dZ, This is very cool. A symbol table is a much more sensible way of enumerating this information . I've taken the liberty of stripping the EXEC entry points from symtbl.asm, adding in the YFTE names (starting with Y_ rather than X_ to make them easy to spot) and sorting them into the same order as YFTE. This is the result: execentry.asm Looking through the symtbl.asm addresses they all matched up with those from dis1600 and the ones I found. I've added all the functions mentioned in appendix E of YFTE. Where an address is not known I've commented the symbol out with an address of $UNKNOWN. It appears we are a little over half way to having all the documented entry points. Of the 109 functions described in YFTE addresses are defined for 69. Cheers decle Yeah, I had forgotten that I left most of the names from dis1600 (X_...) instead of changing them to the ones in the EXEC document. I always meant to do that, but I guess you did now. Quote Link to comment Share on other sites More sharing options...
decle Posted June 25, 2021 Author Share Posted June 25, 2021 It seems there is no job that I can't do in a half-arsed manner, and converting Killer Bees to as1600 is an excellent example of this. 15 years was just not long enough for me to generate 375 lines of bug free Fatal Anthophila code. How do I know this? Well, a copy of the APh CP-1610 assembler and linker has come into my possession, which means we can use a PDP-11 emulator to rebuild a definitive version of @David Rolfe's original code and look at the results... ...and the binary clearly does not match the one I created in 2016. Admittedly the differences were not that significant, but if something's worth doing... As you can see in the video, the same 8" floppy has also provided a previously unseen version of Killer Bees. I believe this is contemporaneous to David's original, as the source file date is April 4th 1979. Having shown the results to David, he provided the following explanation regarding the history of Killer Bees and the possible origins of this new, Mattel variant: Quote "I wrote "Killer Bees" to show the initial "summer hire" people (1978) how to create a simple micro-game. Their job, as college students with a summer job, was to write an assigned Mattel cartridge. My challenge to each of them was to first write their own personalized version of a trivial game, their own "Killer Bees". I didn't want their first game to be a final product; I wanted them to write a throw-away first! So that more elaborate "Killer Bees" you displayed, that's perhaps the product of one of the students? I recall seeing variants sort of like that. The term "Killer Bees" was whimsical, and not necessarily meant as a definitive theme, although of course it became that. At the time, the notion of actual "killer bees" had just come on the national radar, as this slow-moving strain of bees had been coming up from South America (non-native African bees were released by accident) for many years and had finally reached the United States. So it was the panic-of-the-moment news item. Seemed a good excuse for a video game title." So, perhaps this new variant was written by an APh summer hire and somehow made its way to Mattel, where David's Talkin Horse branding was removed. I got to wondering if Mattel's Killer Tomatoes and Crazy Clones tutorial programs might also be derivatives of David's original Killer Bees? Whilst I don't think we have access to Killer Tomatoes, Crazy Clones was released by Intellivision Productions on the Intellivision Lives CD. So, using the binary comparison tool I wrote to look for similarities in Coleco and Parker Bros games we can compare it with Killer Bees. We find that there are a total of 35 instructions shared by David Rolfe's version of Killer Bees and Crazy Clones, split into two sections. This includes the following 25 instruction run taken from David's source code... Spoiler MOV #12,R0 ;SPEED AT WHICH HE RUNS CALL GETVEL ;FIGURE VELOCITY MOV R0,MAN+.OBJMOT ;AND STORE IT MOV MAN+.OBJSTAT,R1 ;GET STATUS BITS AND #NOT ST.XMIRROR,R1 ;NOT MIRRORED IN X TST R0 ;FACING PROPERLY? BPL CTRL1 ;GO IF YES XOR #ST.XMIRROR,R1 ;NO, MUST MIRROR IN X CTRL1: MOV R1,MAN+.OBJSTAT ;AND RESTORE STATUS RETURN ;AND RETURN STPGUY: MOV R3,MAN+.OBJSEQ ;STOP SEQUENCING CLR R0 ;AND MOTION MOV R0,MAN+.OBJMOT ; .. RETURN ;AND RETURN TITLE "MAN STARTS TO RUN OFF SCREEN EDGE" CENTER: BEGIN ; ---------------------------------------------------------------- ; ** decle - the REPEAT means the following block is commented out ; ** and does not appear in the ROM REPEAT 0 MOV #FOREX/2,R0 ;POSITION IN MIDDLE OF SCREEN SWAP R0 ; .. MOV R0,MAN+.OBJX ; .. MOV #FOREY/2,R0 ;SAME FOR Y SWAP R0 ; .. MOV R0,MAN+.OBJY ; .. ENDR ; ** decle - end if commented out section ; ---------------------------------------------------------------- SLL R2,1 ;OFFSET ADD R2,R7 ;DISPATCH BRA OFFRIT BRA OFFLFT BRA OFFBOT ; BRA OFFTOP OFFTOP: MOV #FOREY,R0 SWAP R0 INC R7 OFFBOT: CLR R0 Now this might not seem like much, but Killer Bees is tiny, less than 400 decles in length, and it only contains about 150 instructions (over 130 decles are graphics data). Therefore, nearly 25% of David's Killer Bee code is found in Crazy Clones, a pretty high hit rate. As a consequence, I think there is a reasonable possibility that the ancestry of Intellivision tutorial games might look like this... As always, things are rarely straight forward, and bringing the new Mattel branded version of Killer Bees into the mix complicates things a bit. Although it is very similar to David's version (over 100 decles of shared graphics data in addition to 37 shared instructions), it shares less in common with Crazy Clones (two runs, totalling 28 shared instructions). So the relationship between the programs might not be as linear as is depicted here. Anyway, for those that are interested, the following zip archive contains the source code and binaries for the known versions of Killer Bees, including David's original, the new Mattel variant, and both my 2016 borked and a corrected 2021 version that can be built using as1600. killerBees.zip Cheers decle 8 1 Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted June 26, 2021 Share Posted June 26, 2021 Great stuff, @decle! It is fascinating to see how all of this comes together. -dZ. 1 Quote Link to comment Share on other sites More sharing options...
masseo1 Posted June 26, 2021 Share Posted June 26, 2021 Decle, This is just great. Thank you for putting in the effort in for this. I really enjoyed the video and the thorough explanation of how you went from code in the pdp11, to a working program. You got your hands on the "APh CP-1610 assembler and linker"!!... very awesome! I am particularly pleased to see you doing the work on the pdp11 emulator. We've all heard about how games were created way back when on the pdp11 and custom tools. I just never thought Id ever be able to see it. I'm glad you're still interested in doing these things. 1 1 Quote Link to comment Share on other sites More sharing options...
Walter Ives Posted May 29, 2023 Share Posted May 29, 2023 On 6/25/2021 at 4:48 AM, decle said: Killer Tomatoes On the off chance someone perusing this forum is unfamiliar with great American cinema, a treatment this exhaustive should mention that Killer Tomatoes was inspired by the classic film, Attack of the Killer Tomatoes (1978). Shortly after Mattel closed Cassandra Peterson exposed the film to a whole generation by presenting it on KHJ-TV, Los Angeles area's channel 9. You can watch it for yourselves at WJI 1 Quote Link to comment Share on other sites More sharing options...
Walter Ives Posted May 29, 2023 Share Posted May 29, 2023 On 6/25/2021 at 4:48 AM, decle said: Killer Tomatoes That link is just to the film. You can watch Ms. Peterson's exposition at WJI Quote Link to comment Share on other sites More sharing options...
Walter Ives Posted May 29, 2023 Share Posted May 29, 2023 On 6/25/2021 at 4:48 AM, decle said: Killer Tomatoes Another Hollywood tidbit: George Clooney used the sequel, Return of the Killer Tomatoes, to develop the trademark élan that turned him into a Hollywood superstar. WJI Quote Link to comment Share on other sites More sharing options...
Walter Ives Posted May 29, 2023 Share Posted May 29, 2023 On 6/25/2021 at 4:48 AM, decle said: Now this might not seem like much, but Killer Bees is tiny, less than 400 decles in length, and it only contains about 150 instructions (over 130 decles are graphics data). Therefore, nearly 25% of David's Killer Bee code is found in Crazy Clones, a pretty high hit rate. I suspect that if you look at lines of source the hit rate is substantially higher. Especially if you count the include files. WJI Quote Link to comment Share on other sites More sharing options...
Walter Ives Posted May 29, 2023 Share Posted May 29, 2023 On 6/25/2021 at 4:48 AM, decle said: Now this might not seem like much, but Killer Bees is tiny, less than 400 decles in length, and it only contains about 150 instructions (over 130 decles are graphics data). Therefore, nearly 25% of David's Killer Bee code is found in Crazy Clones, a pretty high hit rate. I'm speculating here, but you can probably make that statement about most if not all Mattel/APh authored cartridges. Major League Baseball was probably the only one that was written completely from scratch (and even that rested on APh's four years of prior experience producing real-time programming). Most/all of the rest are traceable to "Trivia" programs written as training projects, which were themselves built on Killer Bees/Killer Tomatoes, which was itself probably stripped out of Baseball. WJI "I am never forget the day I first meet the great Lobachevsky. In one word he told me secret of success in video game programming: Plagiarize. Plagiarize! Let no one else's work evade your eyes! Remember why the good Lord made your eyes, so don't shade your eyes, but plagiarize, plagiarize, plagiarize. Only be sure always to call it please research." Quote Link to comment Share on other sites More sharing options...
Walter Ives Posted May 29, 2023 Share Posted May 29, 2023 On 6/25/2021 at 4:48 AM, decle said: As a consequence, I think there is a reasonable possibility that the ancestry of Intellivision tutorial games might look like this... Crazy Clones appears to be one programmer's training project. There were dozens of such projects, including many that descended directly from Killer Bees. WJI 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.