Jump to content

ralphb

Members
  • Content Count

    828
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by ralphb


  1. Actually, I was thinking of a read/write counter for ALL memory, displayed in the memory window (if requested), resettable by debugger command. Like a heatmap. (AFAIK, Classic 99 has something like that, but yes, I understand the philosophical differences between those programs. :) )

     

    No immediate need, though, just a nice feature.


  2. No worries, Chris, I share your general sentiment.

     

    My interpretation of this conversation is more like "ok, now that we got this, how can we use/abuse/hack this thing to do what it's not supposed to do?" -- to me, that's the typical hacker spirit. And then everyone jumps in to discuss if this hack is possible or not, and how to do it best. The usefulness of the result is often secondary for hackers.

     

    And I like Ω's posts, as he always seeks out new "business opportunities" for everything that happens on AA, which is something I totally don't.

    • Like 2

  3. Thank you all for the lightning fast replies.

     

     

    Here's a CRU key checking routine that I have used numerous times:

     

    Very handy, thanks! I'll add some mappings to that, because -- as you guessed -- I need to translate key presses A ... Z to indices 1 ... 26, for you-know-what. ;)

     

    (a really quick, ugly hack into MESS :) )

    83f0 ......WWWWRR....

     

    Hey, that's would be an awesome MESS feature! I was thinking of using the debugger to run on a pre-initialized scratch pad and to check which bytes have changed. But you're also detecting reads ... Any chance this might make it into MESS proper?

     

    And in case you're wondering ... The more scratch pad I have, the more images I can sort on the FlashROM. Otherwise, I'd have to revert to VDP RAM, which is doable, but tedious.


  4. Ugh, what a greedy little program!

     

    Are there more economical alternatives already written that handle debouncing, and preferably return the ASCII code of the key instead of some key code? fbForth, perchance?

     

    Size doesn't matter, just scratch RAM usage.


  5. I'd like to maximize scratch pad usage >8300->83ff in my assembly programs.


    What are safe addresses for my own use if I don't use interrupts, DSRLNK, or GPLLNK in my program, and I don't want to return to E/A? How does this change if I still want to use BL @SCAN (in addition to the obvious loss of >8374->8377, >837c, >83e0+)?


    This has probably been discussed countless times before, but Google (and the forum search) is surprisingly bad at searching AtariAge. Or I'm surprisingly bad at coming up with search words.


    Thierry has a nice list of the scratch pad words, but it is not entirely clear when those are used.



  6. No, unfortunately, adding GROM support is not simple at all. In fact, it would be much simpler to add an SD card to the UberGrom than to add GROMs to the FlashROM. This is a guesstimate, though, as I've never looked at the design of an UberGrom -- on purpose, since I don't want to spoil the learning and discovery fun for me.

     

    If I ever do GROM, it will probably not be an extension, but a different design.


  7. About the dimensions: It's 10 cm wide (standard) and 8 cm long, about 1 cm longer than a standard cart. And it doesn't have the hole in the middle.

     

    For the board in the picture I socketed the 541s towards the connector, which makes the cart a really tight fit in the cart port. There's less than a mm head room between the top of the ICs and the plastic frame of the cart port. For any kind of case, sockets are a no-go. No big deal, though; the only thing worth socketing is the big 8515.

     

    And of course cases need openings for the LED, the reset button, and the SD slot.


  8. Tadaa!

     

    post-35214-0-43105300-1460397847_thumb.jpgpost-35214-0-72107100-1460397856_thumb.jpgpost-35214-0-97279700-1460397864_thumb.jpg

     

    My prototypes arrived, and surprisingly they worked on first try.

     

    I do have a few spares. If you're interested in beta testing the board please send me a PM and I'll send you one for S&H. Note that this includes the board and instructions only, so you should be able to get parts, program an ATmega, and assemble the board on your own. If you don't have the tools and/or skills, PM me anyway and we'll see. But please: this is for people willing to test only!

     

    Now the actual release will follow soon. I'd like to exchange the resistors' footprint and redo the silkscreen for improved clarity. On the software side, I need to add two missing features. Once that is done, everything will be released on GitHub so you can build your own cart.

     

    If you don't have the tools (or patience) to build everything yourself, I'll be selling boards and probably assembled carts as well.

     

    • Like 23

  9. Are you at the designing a PCB stage yet?

     

    I'm currently at the schematics stage ... Layout will be challenging because we have two busses criss-crossing all over the board.

     

    How difficult would it be to include more RAM (e.g. the 512k needed to run Alex Kidd :) )? This would be an ideal way for me to test my game on real iron if it had the memory!

     

    Well, somewhat difficult. :) One of my early designs used a 512K SRAM chip and loaded everything up front, then the menu would simply select the corresponding bank. That wasn't very straightforward at all, and loading times are short, so I went for "load on demand" instead.

     

    You can still increase capacity beyond 32K with the current design, but the ATmega 8515 has only one pin left for addressing the RAM. This by itself would not be so much of a problem, though. In fact, I have an alternative design that uses a more regular ATmega 328 instead of the bulky but wimpy 8515. To compensate for the lack of pins I'd add two 590 8-bit counters that address the RAM sequentially -- the software is written not to use random access. But as the size requirements for 328 + 2x 590 vs. 8515 are about the same, I went for the 8515 because that would mean less wires. So you could use that approach to address the ATmega pin shortage.

     

    But the bus switch also has no free pins left. You need to switch the bank selector as well, as the 377 has no output enable. So to answer your question: A higher capacity would require two additional chips on the board, making it even larger. At this point I'd rather leave it as it is.

     

    Would this [soft reset] be solved by what Ksarul and Marc Hull did for the other new cart that was announced yesterday? As explained here: http://atariage.com/forums/topic/250533-new-rom-cart-eliminates-start-up-issues/?p=3473132

     

    Yes, that idea is pure genius -- kudos! That free pin mentioned above should be just right for this task ... I'll have to try this out on the weekend. This would also eliminate the need for the reset button, unless you like to have a hardware reset button anyway.

    • Like 3

  10. Thanks! To answer the questions:

     

    Ralphb is there chance to make some guide to build this board at home.

     

    Yes, that's my plan. Right now I don't even have readable schematics, so the software alone won't do you any good. But I hope to have everything up on GitHub soon.

     

    (Just for my own understanding to understand if I need this): It is different than a nano-PEB correct? (no RS232, no Disk-drive support to load images?)

    Does it require 5V adapter (or it makes use of the internal 5V)

    Would there be a benefit to use the Flash rom card compared to the Programmable UberGrom cartridge (or 2048K Games 1 cartridge) and nano-PEB (32K Memory)?

     

    Yes, it's like a 512K ROM board ("red board"), but you can change the games simply by swapping the SD card. No reprogramming or the like necessary. The ROM boards still have their uses, though, because they don't have a load time for the images. The UberGrom is entirely different, and still the only way to run GROM-based programs.

     

    Power is drawn from the TI, so no external power supply.

     

    The NanoPEB or the CF7+ is a disk and memory replacement. They (or an original PEB) are still highly recommended. Note that a standalone cartridge program can use only 256 bytes of RAM. Disk-based games programs rely on the 32K RAM expansion of the PEB. (But some modern carts, like JSW from Rasmus, also rely on the 32K RAM expansion.)

     

    How is the SD card formatted?

     

    It's plain FAT16 or FAT32, i.e., out-of-the-box SD or SDHC cards, but no SDXC cards. No special program for transferring the images to the card required.

     

    From the video it looks like you're generating a standard TI menu from all the images loaded onto the SD card. How does that work if one of the images contains multiple menu entries by itself? Are you limited to 8 entries/images? You seem to be pressing some switch on the cart/card when changing games, how does that work?

     

    Yes, you're right. If an image has multiple entries, I include them all in the menu. Right now I set an artificial upper limit of 8 entries, but I plan to add a ninth entry "MORE ..." that will take you to a multi-cart like menu selection with the remaining entries. It's not really meant to support 8 GB cards full of images, although there's no real limit other than the limited 0.5K RAM inside the ATmega 8515 to store all the filenames.

     

    The button pressed is the RESET button. Since the cart cannot detect when I reset the console by FCTN-=, I need to reload the menu, or you'll get the menu of the previously selected card. In the end my reset button should also reset the console, but I didn't have the right kind of push button lying around, so I have to reset the console manually. Note that I want the cart to work with unmodified images, so I'm not sure one can do better than that.

    • Like 7

  11. UPDATE: With beta testing completed, the project has now been published. Please refer to post 72 for the release.



    Since January I've been working on a new project: the Flash ROM Cart. As the name suggests, the cart allows playing ROM images stored on an SD card on an unexpanded TI 99/4A.




    The cart works with individual ROM banks, e.g. from RPK archives, or single non-inverted images. In the video I'm inverting an inverted image to get a non-inverted one. (For some reason the screen capture comes out quite blurry, but fullscreen is OK.) The current board uses a 32K RAM chip, so images are limited to that size. No GROMs, sorry.


    I'm using an ATmega 8515 to read data from the SD card and fill the SRAM chip. Bank switching uses the well-known design by Jon, this time with a 377, as those are still commonly available. The 377 is also used for one-way communication from the TI to the cart, i.e., the image selection.


    post-35214-0-95329500-1458478167_thumb.jpg


    Alas, those parts alone won't do. In order for the microcontroller to access the RAM, the RAM needs to be isolated from the TI 99 bus. I thus added three 541 chips that will take the entire cart "offline" when the ATmega is active. This makes it unlikely to fit into a regular TI cart case, but I couldn't come up with a simpler design without resorting to SMD parts.


    As you can see, this is a prototype. This even started on a breadboard with an Arduino, but I soon grew out of that. I'll do a layout and get proper boards made next. Once I have that I'll publish everything up on GitHub so that other people can get their hands on it.
    • Like 24

  12. What I was after was a simple first pass check to see if someone typed 2 or more labels which are identical, this would throw an exception example : XGA99 Duplicate Label found "START".

     

    Yes, the latest fix does just that. You can get the file from GitHub via the link above.

    • Like 1

  13. ralphb, Can you kindly indicate what is the expected result of an SRL 0,@>8300 ?

     

    Good question. The GPL spec doesn't state what happens for a shift value of 0. But if GPL is like assembly then shifting by 0 actually means shifting by 16 -- which would shift all the bits away.

     

    Now GPL is 8-bit only, so it makes only half sense ... Why don't you try SRA 0,@>8300, where the original value of >8300 is >80? If the assembly theory is correct, you should get >FF afterwards.

     

    EDIT: I just remembered: In assembly, shifting by 0 means shifting by R0, and if THAT is 0, then you shift by 16. So it only makes quarter sense for GPL now.

    • Like 1

  14. Ha, that's actually quite a funny bug. It's been fixed on GitHub now, though.

     

    Most compilers and assemblers are multi-pass, i.e., they read the source code multiple times before generating code. The reason is quite simple: If you have a forward reference, e.g.,

    .

          ...
          JMP  NEXT    <---- where is NEXT?
          ...
    NEXT  CLR  R0
    

    .

    then you cannot create code for a jump to a location you haven't seen yet.

     

    The xas99 assembler is two-pass: The first pass reads the source code to find values for all symbols, and then the second pass generates code, substituting the previously found values for all symbols as it goes along.

     

    Interestingly, a two-pass assembler won't do for GPL. GPL has many different addressing modes for RAM, GROM, VDP RAM, and VDP registers. To save space, the language encodes addresses in 1, 2, or 3 bytes, depending on the value of the address. All ROM/RAM addresses are encoded relative to >8300, and the farther away an address is from >8300, the more bytes it takes to encode it.

     

    For example, in the instruction ST 1,@>8300, GPL encodes the @>8300 as @>00, but would encode @>8380 as @>0080 and @>9000 as @>0F1000.

     

    So if you have code like

    .

    .ST 1,@ADDR
    

    .

    then the compiler needs the second pass before it can generate the code for this instruction. Now look at this program (from the xga99 test suite):

    .

    S1   ST  1,@CPU1
    S2   ST  2,@CPU2
    S3   ST  3,@CPU3
    
    EXIT
    
    CPU1 EQU >837F
    CPU2 EQU >837F+S2-S1-3
    CPU3 EQU >837F+S3-S1-3-3
    

    .

    The values of Sx and CPUx depend on each other, and since all CPUx values are just slightly below >8380, their encoding might be 1 or 2 bytes, depending on the size of each Sx instruction above.

     

    The first pass defines all symbols, but the second pass will move S2 and S3 as the argument of S1 has changed. Consequently, the values of CPUx will also change. In other words. the code after pass 2 is still "unstable", and thus not correct. So the GPL assembler needs another pass. This time, S3 is moved, as the argument of S2 has changed. Only in the fourth pass do all symbols remain stable, and we're done.

     

    xga99 has an upper limit of 32 passes, which is arbitrary, but 32 passes should be enough for anybody.

     

    But now back to the label bug: Because of some incorrect duplicate label check, the statement with the duplicate label changed the value of that label symbol twice per pass. xga99 correctly thought that some symbol is still unstable and triggered another pass, until we hit the 32 limit.

     

    So when I heard your error description, I knew immediately what went wrong. :)

    • Like 1

  15. Turns out it wasn't straight-forward at all :) , but at least now the code base of xga99 and xas99 is much better aligned again.

     

    xga99 now supports conditional assembly, and macros. So regarding your request, you can write

    .

    START
       .ifdef TEST
       DST 999,@Lives
       .else
       DST 3,@Lives
       .endif
       DST 1,@Index

    and assemble with

    .

    $ xga99.py sample.gpl                  <--- 3 lives
    $ xga99.py sample.gpl -D TEST          <--- 999 lives

    .

    You can also assign values, so you could write

    .

       .ifdef TEST
       DST TEST,@Lives
       .else
       DST 3,@Lives
       .endif

    .

    and assemble with
    .
    $ xga99.py sample.gpl -D TEST=69

    .

    You can also use macros now, but note that I don't support the "default" macros like $WHILE etc. yet.
    Please get the updated xga99 from here, as there's no new release yet. The manual has also been updated, but you can just have a look at the matching sections for xas99.
    Edit: That forum editor is killing me ...
    • Like 1

  16. Oh, I thought you closed down the other shop -- glad this isn't so. :thumbsup:

     

    Yes, it totally makes sense to be on Facebook to reach a wide audience, I'm just a bit cranky when I see information and services move from the free Web to gated communities (pardon my pathos). In any case, my best wishes!

    • Like 1

  17. I didn't so much "remove" anything from the TIFILES header format as refuse to support the extensions to it.

     

    My only wish regarding the outcome of this debate would be that (1) the layout of both variants be the same and (2) one can clearly identify which variant a given TIFILES file is, e.g., by storing well-defined and/or invalid data in those fields where the PC file properties should be considered instead. Maybe this already is the case, although I think I've seen nameless TIFILES with somehow truncated header ...

    • Like 1
×
×
  • Create New...