Jump to content

Search the Community

Showing results for tags '6502'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Atari Systems
    • Atari 2600
    • Atari 5200
    • Atari 7800
    • Atari Lynx
    • Atari Jaguar
    • Dedicated Systems
    • Atari 8-Bit Computers
    • Atari ST/TT/Falcon Computers
  • Gaming General
    • Classic Gaming General
    • Classic Computing
    • Modern Gaming
    • Prototypes
    • Arcade and Pinball
    • Emulation
    • Hardware
    • Gaming Publications and Websites
    • International
  • Marketplace
  • Community
  • Game Programming
  • Site
  • Classic Gaming News
  • The Club of Clubs's Discussion
  • I Hate Sauron's Topics
  • 1088 XEL/XLD Owners and Builders's Topics
  • Atari BBS Gurus's Community Chat
  • Atari BBS Gurus's BBS Callers
  • Atari BBS Gurus's BBS SysOps
  • Atari BBS Gurus's Resources
  • Atari Lynx Programmer Club's CC65
  • Atari Lynx Programmer Club's ASM
  • Atari Lynx Programmer Club's Lynx Programming
  • Atari Lynx Programmer Club's Music/Sound
  • Atari Lynx Programmer Club's Graphics
  • The Official AtariAge Shitpost Club's Shitty meme repository
  • The Official AtariAge Shitpost Club's Read this before you enter too deep
  • Tesla's Vehicles
  • Tesla's Solar
  • Tesla's PowerWall
  • Tesla's General
  • Harmony/Melody's CDFJ
  • Harmony/Melody's DPC+
  • Harmony/Melody's BUS
  • Harmony/Melody's General
  • ZeroPage Homebrew's Discussion
  • Furry Club's Chat/RP
  • PSPMinis.com's General PSP Minis Discussion and Questions
  • PSPMinis.com's Reviews
  • Atari Lynx 30th Birthday's 30th Birthday Programming Competition Games
  • 3D Printing Club's Chat
  • Drivers' Club's Members' Vehicles
  • Drivers' Club's Drives & Events
  • Drivers' Club's Wrenching
  • Drivers' Club's Found in the Wild
  • Drivers' Club's General Discussion
  • Dirtarians's General Discussion
  • Dirtarians's Members' Rigs
  • Dirtarians's Trail Runs & Reports
  • Dirtarians's Wrenching

Blogs

There are no results to display.

There are no results to display.

Calendars

  • AtariAge Calendar
  • The Club of Clubs's Events
  • Atari BBS Gurus's Calendar
  • ZeroPage Homebrew's Schedule

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website


Facebook


Twitter


Instagram


YouTube


eBay


GitHub


Custom Status


Location


Interests


Currently Playing


Playing Next

Found 46 results

  1. Hi, I wanted to try out using the S: CIO screen editor in Assembler, but I'm not sure I am going about it in the right way. When I do an OPEN, PRINT "Hello World", CLOSE, I get the attached screen, but it has 2 cursors in column 0, and a cursor after the "Hello World". The code is quite simple, and uses the OPEN, PRINT and CLOSE macros from Mac65. *= $5000 JMP PROGRAM_INIT ; ; MAC65 Macro files. Mainly used for I/O Macros ; .INCLUDE "SYSEQU.M65" .INCLUDE "IOMAC.LIB" .INCLUDE "OS.asm" PROGRAM_INIT LDA #<END_OF_PROGRAM_MEMORY STA APPMHI LDA #>END_OF_PROGRAM_MEMORY STA APPMHI+1 LDA #1 STA CRSINH LDA #0 STA LMARGN OPEN 1,12,0,"S:" ; PRINT 1," " LDA #20 STA COLCRS LDA #0 STA COLCRS+1 STA ROWCRS PRINT 1,"Hello World " CLOSE 1 LOOP1 JMP LOOP1 RTS END_OF_PROGRAM_MEMORY *=$2E0 .WORD PROGRAM_INIT I've also attached the ATR containing the executable (T1SET.EXE). Is there any way of getting rid of the extra cursor characters (actually all 3 of them)? I thought they would not be present as I set CRSINH to 1 right at the start of the program. At the moment I am working from Chapter 8 of the Atari System Reference manual by Bob Duhamel - if anyone can point me to any other info on using the S: device from Assembler, that would also be appreciated. The reason I'm looking at this is that I saw this post: and started to wonder about using the S: driver, which I haven't used before (I'm planning on converting the screen I/O in ATR Maker Deluxe - and other programs - to use the S: device, but I want to write some test programs first to make sure it works OK). Also, I'm not sure if I am setting APPMHI correctly, this is required according to the Reference Manual, but not something I can recall using before. Any help would be appreciated! t1set.atr
  2. DIS6502 is an interactive 6502 disassembler. It can disassemble handle plain binary files and support specific executable files of Atari 8-bit, C64 and Oric computers. This support also includes the labels and handling of the operating system vectors to make the disassembly better. It can output the assembly listing in different configurable formats and comes with preset profiles for popular assemblers like ASMED, CA64, LADS, MAC65, and MADS. There are currently two versions available: Latest 3.0 beta build: https://www.wudsn.com/productions/windows/dis6502/dis6502.zipwith resizable window and many new features Old but stable version 2.2 from 2006: https://sourceforge.net/projects/dis6502/files/latest/download Version 3.0 uses a new workspace format. You can open old workspaces in older formats but only save in the new format. Therefore you should make a backup of your old workspace, before using the new version. Version 3.0 is not yet officially released, but you are strongly encouraged to use it and send feedback.
  3. I am using this bit of code to decide if the velocity is going to be positive or negative when a new game is started. GetRandomByte lda Random asl eor Random asl eor Random asl asl eor Random asl rol Random ; performs a series of shifts and bit operations rts jsr GetRandomByte ; generate a random number lda #%10000000 ; 1 in most significant bit mean greater then 127 bit Random ; was it less then 127? bne RandomVX ; if it was then branch lda #$ff ; set the starting duck's x velocity to -1 jmp RandomVXDone ; and jump cause we're done RandomVX lda #$01 ; set the starting duck's x velocity to 1 RandomVXDone sta DuckVX ; store duck's initial x velocity jsr GetRandomByte ; generate a random number lda #%10000000 ; 1 in most significant bit mean greater then 127 bit Random ; was it less then 127? bne RandomVY ; if it was then branch lda #$ff ; set the starting duck's x velocity to -1 jmp RandomVYDone ; and jump cause we're done RandomVY lda #$01 ; set the starting duck's x velocity to 1 RandomVYDone sta DuckVY ; store duck's initial y velocity However no matter what the velocity always stays the same. Bin: https://www.dropbox.com/s/ikjnebg1moyn0k4/duckgame.bin?dl=1
  4. It can be done in any coding language but i think assembly will be fastest. I'm looking for solution that is faster than ATARI basic which is 50-80 muls per sec and it have loss of precision :( How many times per second can 6502c multiply 10-digit number by 10-digit number without a loss of precision?
  5. Hello everyone I'm in the process of building a VCS based hardware clone from scratch and have a few queries; I am going to replace the 6507 with 6502 (to get full 64k addressing + hardware interrupts + phi 1 and phi2 clocks ) and adding 32k of extra ram like the super Atari project (site is down but thanks for the wayback machine http://bit.ly/2FHlAH7) But these "NEW" eBay 6502 cpus (http://ebay.to/2DzjYJC) should work, or are these new chips like 65c02 in that the silicon has been altered due to "modern manufacture reasons"? And what's the highest clock speed available on a 6502? Also can you place some asynchronous buffer sram [cy7c408 = 128byte sram fifo memory] (http://bit.ly/2HGAAlm) between the data lines on the tia and 6502/7, so that the when the TIA Is drawing the data is already in the buffer, and all the cpu needs to do is correctly send the corrects address locations relevant to data stored in the buffer? (i.e instead of cpu calculating the display every scan-line you simply write a few scan-lines of image data into the buffer before The TIA begins to draw, then just correctly address in the order of whats stored in the buffer and do program logic) Since the [cy7c408a] is dual ported with asynchronous R/W, means you can just clock the output data [DO0-DO7] bus with the 1.19MHz clock from the TIA, iirc the TIA doesn't tend to like bus speeds higher than 1.19MHz? Then this should allow one to overclock the 6502 with for simplicity of counting cycles a multiple of the [ntsc] color-burst [TIA] clock ( i.e being able to have 684 cpu cycles per scan-line {using a 6502 clocked @ 10.75MHz = ~3x the TIA clock } instead of just 76 cycles) in such cases also sacrificing [native 2600] compatibility for increased cpu speed and more time for crunching instructions. I would also assume having the TIA reading the buffer @ 1.19Mhz would present in situations a bottleneck as well (when "drawing" to the TIA)? Since you can write data faster to the buffer than its being read (if the CPU is overclocked)? Since it seems the cy7c408 operates similar to a giant shift register, once its written you have to wait until data to reach to the TIA before it you write new data?? Can you just fill the buffer with 128 bytes of scan-line/sound data for the TIA, then handle the TIA addressing, and just fill the buffer as its being emptied, and essentially have 128 bytes of "VRam" (well more like Video buffer)? Also Can NMI be used instead of RDY, so that when the tia begins a new frame, wsync simply have the TIA tell the 6502 to "Stop, Pause , Go and do Display routine and then come back here", instead of just halting the cpu? Aswell i have a few microchip and avr (atmega8515) mcu's laying around wanting to be used for something and with a both MCU's, it's instructions are pipelined so that it takes effectively 1 cycle to load and execute data or decode and execute an instruction, except iirc when changing the program counter which iirc takes 2 - 3 cycles, So you don't have wait states [i.e iirc if using a z80, thats takes 3+ cycles for most of its instructions which is why they have such high clocks]. Is it possible to use the atmega or 18f4550 as sort of display controller for the TIA having the MCU handle reads from the buffer instead, and handle writing the data to the TIA, and use the atmega8515 to emulate the RIOT? Is it possible to emulate the Riot but with 256 bytes of ram? iirc RIOT ram is in page 0 so is faster to access than the 32k of extra ram? Plus is it possible, using A12 and A15 with a 74hc138 and a logic gate or two as a way to partially decode address to swap between cartridge space and 32k ram, so one can simply keep some compatibility, simply if A12 is high and A15 low then cartridge ROM is accessed, and if A15 is high in any case 32k Ram is Accessed? just building it to just play 2600 games isn't really hard (it was done from 1977 to 1992 literally millions of times), and seems a little redundant to me, I just figured since you can build your own 2600 compatible hardware clone for less than $50 in parts shipped, why not beef it up for some shits and giggles like a dev kit, have 256k of rom space and 32k ram, 6502, if possible using an MCU or 2 as an "In Hardware display Kernel", as well as emulate the riot, And CO10444D. why you ask? Because i i'll have the only atari "super" VCS with full USB 2.0 support (upto 12Mbit/s if I do use the 18f4550 lol) and plus i can really push the hardware to the limit see what it can do with some actual "power" behind it
  6. I am having a small issue with my code. I am trying to get the duck to stop when it reaches the top after hitting the flyaway state. However no matter what I try the code gets ignored. Source Code Relevant section Any of you experts have any ideas on what's going on?
  7. Hello all, First, I should introduce myself. My name is Boisy Pitre and I've been involved with the Tandy Color Computer (CoCo) and its community for some 30 years now. I run Cloud-9 (www.cloud9tech.com) along with my friend, Mark Marlette, where we sell CoCo hardware and software, and lead several open source initiatives in the CoCo community, most notably the NitrOS-9 operating system. I've always been interested in Atari computers as a kid, having had an Atari VCS back in 1980.During my teen years, I never got into the home computer end of Atari, though I was keenly aware of the scene. Now that I'm a little older, I can indulge more than I could back then . One of my more recent desires has been to obtain a 6502 based Atari computer such as an Atari 400/800 or 130XE, and replace its 6502 microprocessor with a 6809 (the same processor that is in the CoCo), then get NitrOS-9 running on that hardware. An interesting amalgamation of technologies, if you will, but nevertheless something that has intrigued me. To that end, I've obtained an Atari XEGS from eBay, along with a keyboard and a few cartridge based games. I've taken the system apart and identified chips that will need to be replaced for this project (the SALLY (6502) and the 16K ROM) Both have been desoldered and replaced with 40 and 28 pin sockets, respectively, and both chips were salvageable during the desoldering process. They have been placed back in the freshly soldered sockets and the machine comes up just fine. Along with working towards mating the 6809E electrically into the board, I need some advice on how to bring up the board to a known state once the processor is working. My thought would be to make some interesting sounds through the sound chip and setup the video mode, but in order to do that, I need detailed information on the actual chips involved, their addresses, etc. In order to do this, I think it would be important to obtain a disassembly of the 16K ROM, as well as find any cross-assembler 6502 tools that are useful. Can anyone point me to a fully annotated disassembly of the contents of the XEGS ROM, as well as the tools of choice to do assembling? Thanks, and I"m looking forward to being part of the Atari community.
  8. I've been reading several threads regarding various hard reset schemes people are using or have recommended and every method seems to be convoluted and complicated to deploy when back in the mid-80's many of my friends with Ataris and myself would simply run a momentary push-button switch through a resistor to pin-40 of the 6502 (Sally) chip that would pull the reset pin low while pressing the button. This always seemed to me to be the most elegant solution and the simplest as well. Since pin-40 of the processor is the RESET pin, logically this would be the right path. Since the pin is pulled high through a resistor already, pulling it low (to ground) through a lower value resistor will cause the processor to reset, thus rebooting the computer. The Atari users in my group of friends never had any failures due to this method of choice for hard resetting the Atari. Does anyone know why other more intricate or complicated methods are the only ones talked about now (methods that use TTL chips and focus on various other chips and pins)??
  9. I stumbled across this video presentation about reverse engineering the MOS 6502, and of course I had to watch it. Quite an interesting watch! I always wondered about the LAX/SAX instructions, and why there aren't similar illegal opcodes for other register combinations. Turns out that the opcode's lower bits define which register is to be worked with, %00 for Y, %10 for A, and %01 for X. %11 is not intended to be used, but when it is used, it causes both A and X to be affected, explaining why we don't an opcode for, say, LAY. As stated in the video, visual6502.org has a lot of information about the 6502 line of processors, and many others, as well. The ultra-high-resolution images of the chip are there, and my nerd wants to print them up and frame them on a wall. I'm not really a hardware guy, more of a software guy, but for some reason I love learning how computers work (or trying to). I guess that's why I prefer the low-level programming languages. Assembly is about as low as you can get without getting into machine code, and it's a lot of fun for something like the Atari 2600. It brings you closer to the machine, and although it doesn't let you see the physical chip layout, it gives you an idea of how it must theoretically work. I would love to try programming for the other old 6502 systems like the NES after I have a 2600 game or two complete, but anything other than that is better suited to a higher-level language. C++ is my favorite language for programming, although Python is nice for simple tasks that you just want to write quickly without worrying about code efficiency.
  10. Just stumbled into a bug with MADS' built-in ADW macro when used with (ZP),Y: LDY #$04 ADW (OBSPEC),Y PTR2 PTR4 A334: A0 04 LDY #$04 A336: 18 CLC A337: B1 C1 LIMITCLIP.OFFSCREEN LDA (OBSPEC),Y A339: 65 E2 [email protected] ADC PTR2 A33B: 85 E6 STA PTR4 A33D: C8 INY A33E: B1 C1 LDA (OBSPEC),Y A340: 65 E3 ADC $E3 A342: 85 E6 STA PTR4 ; <<<<<<< should be $E7, not $E6 LDY #$04 MWA (OBSPEC),Y PTR4 A334: A0 04 LDY #$04 A336: B1 C1 LDA (OBSPEC),Y A338: 85 E6 STA PTR4 A33A: C8 INY A33B: B1 C1 LDA (OBSPEC),Y A33D: 85 E7 STA $E7 ; <<<<<<<<<<<<< $E7 = correct Using the latest build here, and I'm sure ADW used to store the MSB correctly in older versions. Haven't looked to see if the bug exists in SBW as well.
  11. Operating from a Windows PC development environment, I would like to be able to test my 6502 Assembly code. So, for example: I might have this code: org $0600 CLC LDA #5 ADC #3 STA 203 <end of code> I would like to be able to execute a command from the PC which will check that the above code puts the value of '8' into memory location 203. It may run Altirra or a 6502 emulator in the background, but I need to be able to extract that memory location and then report it back to the calling program. At the end I want "Test passed" or "Test failed" or something similar displaying. This way I can build up an automated test suite for all of my procedures / sections of code / macros. I have no problem with it bringing up windows whilst testing is going on, but I want all of the windows closed at the end of the tests. Any ideas of the best way of implementing this? I guess I'd need to automatically dump the memory contents and then extract the memory values that I require...
  12. My son recently expressed interest in learning programming. Instead of fumbling my way through it I decided to make a series of lessons on programming. This is the first one. I hope you guys enjoy it. https://www.youtube.com/watch?v=gEj3NbChJx8
  13. Nox Archaist is a new role playing game in development by 6502 Workshop exclusively for the Apple II platform and emulators, with floppy and hard disk support. We are excited to announce the first in a series of mini stories using the Nox Archaist engine to demo the newest features in the game. The Nox Archaist story line is still under development. Any names or characters used in these mini stories are not intended to depict real or imagined NPCs, events, or bovines in the actual game. Any similarities are coincidental. ----Nox Archaist S1E1: Shattered Sword---- In this episode our hero travels to town and faces an epic struggle to get his sword repaired after breaking it over an ogre's head. http://www.6502workshop.com/2016/11/nox-archaist-s1e1-shattered-sword.html New game play elements to look for in this video include: *Conversation with NPCs *NPCs moving between locations on the map based on their daily schedule *New interactive tiles ----About Nox Archaist---- Nox Archaist, by 6502 Workshop, is a 2D tile based fantasy RPG with a classic Apple II look and feel. Our mission is to develop a modern evolution of the Apple II RPG genre, while exploring how gameplay might have advanced in tile-based RPGs if large scale development had continued on the Apple II platform after the 1980s. http://www.noxarchaist.com
  14. http://skilldrick.github.com/easy6502/index.html
  15. Anyone heard of INHOME Software? Anyone still programming for 8-bit atari? What is the best set-up. I'd like to use my Mac and a 65XE? Or should I go old-school with an old 800? Is there an interest in New games for the Atari 8-Bits?
  16. We are excited to introduce Nox Archaist, a new role playing game we are developing exclusively for the Apple II platform and emulators. Currently we are targeting a release date late this year. Nox Archaist will be available 100% free and the complete assembly source code will be posted on our blog. One area that we have been kind of winging is tile graphics art. We would like to offer a chance for members of the retro gaming community to participate in the design of Nox Archaist while hopefully improving the final result and getting the game into your hands more quickly. We are running a tile graphics contest! The top three submitted tiles will be determined on 7-31-2016 and the winners will receive the benefits below: *One custom in-game NPC named and based on input from the winner *Copy of the initial release of Nox Archaist on 5.25” floppy disks *Pre-release digital copy of Nox Archaist *Printed manual *Name mentioned in Nox Archaist game credits *Announcement of winners on our blog and in this forum *Any other goodies we can come up with To participate, just send us one or more tile designs using the criteria provided at the link below. Submissions can be sent via email to [email protected] Here is a link with contest details: http://www.6502workshop.com/p/graphics-contest-rules.html =====ABOUT NOX ARCHAIST===== Nox Archaist is a 2D tile based fantasy RPG with a classic Apple II look and feel. We are taking advantage of the full 128k available on the IIe and later models which will help us create features and effects that may not have been seen in vintage 1980s Apple games. Our goal is to explore how gameplay might have advanced in tile-based RPGs if substantial development had continued on the Apple II platform past the late 1980s. Game play videos and screenshots showing the current evolution of the Nox Archaist game engine are available below. http://www.6502workshop.com- Nox Archaist website with our blog, current gameplay videos, screenshots, and gifs. - Demo gameplay video featuring the current game engine. - Demo gameplay video featuring sunrise/sunset and in-game clock features
  17. I need to add two 16-bit integers (let's call them A and B; A is signed, B isn't) and get the result, less 1. Sure I can do a 16-bit decrement on the result of the addition, but 16-bit DECs require a branch instruction (for MSB roll-over) and I'm trying to save cycles. I considered using a 256 byte look up table of the index value less 1, but this comes unstuck when then LSB is zero, since element 0 is $FF: ldx a lda Less1Tab,x clc adc b sta c lda a+1 adc b+1 sta c+1 rts Less1Tab .byte $FF ?Value = $0 .rept 255 .byte ?Value ?Value = ?Value+1 .endr Making the first element of the LUT $FF seemed like a great idea until I realized it sets the carry flag when subtracting 1 from 0, messing up the MSB. Any more complex and it'll be easier to DEC the result. Any ingenious ideas?
  18. Hello- I am currently trying to convert some old 6502 source code to compile with DASM. One of the commands keeps getting a syntax error and I can't figure out what to change it to. The commands are currently: LDA #HIGH MYVEC LDA #LOW MYVEC MYVEC is the label of a subroutine. Anyone know the proper DASM conversion?
  19. Hello, I recently got a 130XE off EBay as a way of getting back into Atari 8-bits. (I sold my original Atari 800, with a Happy 1050, in 1985 to upgrade to an Amiga 1000). I have an Assembler/Editor cartridge left over from my '90s retrogaming collector days. I think it would be fun for learning 6502 programming since it's on the actual hardware. When I get going with "real" projects, I would switch to a cross-assembler and I wondering which is best to use for a newbie. I definitely would use WUDSN IDE, since I'm already familiar with Eclipse. ATASM seems nice because it is compatible with MAC/65, but judging from this forum all the cool kids seem to be using MADS. My concern with MADS is that if you know only English, the documentation seems a bit like folklore. It also seems like a "power user" tool that might be overwhelming at first. Interested in hearing comments from people who are using these tools now. Thanks!
  20. LucasFilm's Macross 6502 Assembler has been released to Github. https://github.com/Museum-of-Art-and-Digital-Entertainment/macross
  21. Hey Guys, As some of you know I'm in the process of releasing my first homebrew game called Candy Catcher which I'm very excited about and have been extremely happy with the responses I have gotten from the game so far. However during the development of that game, i quickly realized not only the complexity of my statements I was making in batari Basic, but also the amount of ROM (Read Only Memory) space my code was taking, I had some statements that were easily pushing 50 ~ 75 bytes. That doesn't sound like much but when you only have 4096 bytes to work with, you only have ten of those statements, you have used a 1/5th of your available ROM space. I was limited to 4k, easiest way for my to make my game into a cartridge and release what I was considering a budget title. I had many more ideas for additional features in Candy Catcher that never saw the light of day because of ROM limitation issues. So for my next game that I'm keeping quite until I have a playable demo to present, I decided to learn assembly to reduce the amount of ROM space my code is taking and to give me great control of the number of objects that appear on the screen and to give me more flexibility with the speed and execution of my code as well as cutting down on the ROM space my code requires. I'm going through Atari 2600 Programming Tutorial posted on Random Terrain's site, getting my machine setup and learning the basics of Machine Langauge from the beginning. I also have Machine Language For Beginners by Richard Mansfield and 6502 Software Design by Leo J. Scanlon as references as I go. I'm going to be doing all my development on my Mac Mini Server as its my main desktop (Mirror Raid Harddrives are freaking awesome) and I'm not having to run a VM of Windows XP to do development of my game which is also nice which I did for Candy Catcher. My goal is to update this blog weekly with examples of what I have figured out and with tips to help others along as well. Thanks Disjaukifa
  22. The interface for a good assembler is just like a text editor, with extra features added to make assembly easier. Take a look at this simulated screenshot, inspired by the Apple ][. This is a multiply routine for the Motorola 68000: There are several things that would make this more of an assembler than a word processor: Under the label "Multiply," there is a blue line stretching across the screen. You could toggle this on or off. Under this line can be shown information about the subroutine (e.g. input/output). Each line of code is indented automatically. The local labels have a period before them, and are not indented. There is a red "+" before the label. Clicking it changes it to a "-" and makes the code disappear. You could click the "-" to make the code reappear. Whether the code is folded or not, it's compiled when requested. When compiled, the branches with the ".s" extension will resolve to a ".b" (8-bit) or ".w" (16-bit) displacement, whichever is the shortest possible. If the extension is left off, assume it to be ".s". That way, you don't have to figure it out yourself. In this example, the screen is 480x360 pixels. Characters are 7 pixels across and 8 pixels down, just like on the Apple ][. In system RAM, this could be handled with one table telling which ASCII character to show (one byte per character), and another table to tell the background/foreground colors for each cell (in each byte, there are 4 bits for background color and 4 bits for background color). By default, the line under labels is enabled, tab width is 8 characters, lines after labels and code automatically indent, and code is not folded. When a mouse is used, the character that the mouse is pointing to is shown in a different color (for example, in the above screen, it would be shown as a white cell with a blue character). Characters would be stored as ASCII. The blue underline is toggled on/off with a control byte, and the tab width is also controlled using a certain byte. You could use any programming language you want, be it 6502, 68K, Z80, BASIC, etc. Regarding the keyboard, there could be additional keys based on what programming language you use. In addition to a regular ASCII keyboard, there could be attachments you could just snap on. For example, a 6502 keyboard attachment might have buttons labeled "LDA," "STA," "CLC," "SEC," "ADC," and "SBC." Next, I'll mention some enhancements you could make to the screen.
  23. I have used a lot of assemblers to program games. I have used Learn to Program BASIC, BasiEgaXorz, and EASy68K. I have also used Apple ][ Basic, C++, and others. There are many different assemblers out there, but what if there was a computer (or maybe an application) with a really sophisticated assembler that could be used for programming games, and other things? The goal is to make programming easier, faster, and more enjoyable. First, I'd like to mention all the essential things that any good assembler needs. Fast interface, as well as fast assembling. The ability to cleanly divide a ROM into sections. Code/data folding. The ability to test code as you write it. Storing colors, but showing them visually, rather than as numbers. Storing graphics for a game as data, and making it show like it would in the program. Compress graphics if necessary. If it's for a system that uses tiles for graphics, computing the mappings for them. Compress data in some way. Test code for length. Being able to make short/long branches automatically according to smallest possible file size. Making sure VBlank code starts and ends properly. For any routine, sort the local labels alphabetically or numerically. Add a number of labels to a ROM that follow a certain character pattern. Add/manage data structures. Lets you pick labels/variables from a list. Calculates a ROM checksum and/or adds code. Pads a ROM to a number of bytes that is a power of 2. I might add more of these. Over time, I will be adding blog posts regarding one or more of these elements. Keep in mind that any images posted in this blog are simulated. The Apple ][ is my inspiration for their look, since it was one of the first computers I grew up with.
  24. Here's the 6502 assembler I mentioned recently on the Atari 8-bit forum. The reasons to write this were: 1.) None of the assemblers I tried could generate correct code for code assembled to run in zero page and have forward references to other code in zero page, changing their operand in real-time. 2.) I wanted to write an assembler in sh (years ago, I came across osimplay, which I thought was pretty neat). shasm65 is written in sh, the Unix Bourne Shell, with a few extensions used which are not available in all sh incarnations. So far, I have adapted it to work with bash, zsh (~28% faster than bash) and mksh (ksh93, ~52% faster than bash). ash, dash, ksh (ksh88) and pdksh all fail to work, either because they lack array support or do not allow function names to start with a dot. Both issues could be "fixed", but that would make it slower and/or pollute the internal namespace, so I decided against it. Its syntax is different from all other 6502 assemblers, because an input file is treated as just another shell script, which is sourced by the assembler. Mnemonics are function calls and its arguments are the operands. Labels are defined by using the special function L and assembler directives are functions starting with a dot, like .org, .byte, .word, et cetera. Labels are referenced as shell variable names (ex. jmp $label). Numbers/memory locations can be specified in decimal, hexadecimal (ex. 0xfffe) or octal (ex. 0377). To fix the main reason for writing this assembler (see point 1. above), shasm65 uses different mnemonics for some addressing mode. For example, loading A from a zero-page location is lda.z. This way, the assembler knows immediately exactly how much storage an instruction requires. addressing modes: implied no suffix, ex. cli accu .a, ex. rol.a zp .z, ex. lda.z 0xfe zp,x .z, ex. adc.z 128,x zp,y .z, ex. stx.z 64,y (ind,x) .i [,x], ex. lda.i [23,x] (ind),y .i [],y, ex. cmp.i [017],y immediate ., ex. lda. 17 absolute no suffix, ex. dec 0x6ff absolute,x no suffix, ex. inc 0x0678,x absolute,y no suffix, ex. ldx $fubar,y (abs) .i, jmp.i [0xfffe] relative no suffix, ex. beq $loop directives: .org start [dest] start address of next block (optionally loaded at different location) .byte x y z ... include literal bytes (no comma but spaces between the arguments) .word x y z ... include literal 16-bit little-endian words .ascii "ascii string" include literal string .screen "string" include literal string of Antic screen codes .space size reserve size space .align b align to b-bytes boundary .binary filename include _raw_ binary file filename . include source file (shell script, library functions, etc.) L name define label Because both the assembler and the source files it assembles are just shell scripts, you have all of the shell functionality (including calling external applications) as your "macro" language. You can create your own functions, use for loops, tests, if/then/else/fi conditional assembly, arithmetic, all you can think of. # lines starting with a hash are comments # the code below demonstrates a few of the features START_ADDRESS=0x3000 clear_pages() { # start number_of_pages ldx. 0 txa L loop for foo in `seq $1 0x0100 $(($1+($2-1)*256))` ; do sta $foo,x done inx bne $loop } .org $START_ADDRESS L clear_some_mem # inline unrolled loop to clear 0x4000-0xbfff clear_pages 0x4000 $((0xc0-0x40)) rts L host_info .ascii $(uname -a) There are two built-in functions: lsb() least-significant byte, ex. lda. `lsb $dlist` msb() most-significant byte, ex. lda. `msb $handler` Variable-, function- and label names should not start with an underscore or a dot. Both are reserved for the assembler itself. Also, all shell reserved words are prohibited. shasm65 has the following command line options: -oFILE write output (Atari 8=bit $FF$FF binary format) to FILE -v verbose output -h -help --help -? output credits, license and command line options with a short description and their defaults So, why a shell script? Well, because I can, it is fun, the code is short (~300 lines), it runs on many, many platforms, it provides a very powerful scripting/macro language and it's fun So, no drawbacks? Yes, there are. Shell scripts are interpreted and therefore shasm65 is a lot slower than the usual assemblers written in C and compiled to native machine code. I have probably missed describing some features or quirks, but basically, this is it. Have fun Any questions, post below.
  25. Two months ago I found a SID disassembler at the website of Covert BitOps. I rewrote large parts of it and added support for SAP and NSF (NES) files. It tries to do some simple code-flow analysis to determine code and data blocks. The output is compatible with ATASM. Because I want to avoid it'll bitrot on my harddisk, like so many other of my projects, I decided to post it here. Have fun. Possible improvements (todo-list): * command line option to manually mark blocks as code or data * add emulation engine to better handle self-modifying code * multiple assembly formats (xasm, mads, et cetera)
×
×
  • Create New...