Jump to content
IGNORED

A8DS - An Atari 8-bit Emulator for the DS/DSi/XL/LL


Recommended Posts

Ok. Sounds like you maybe removed XEGS-DS and dropped in A8DS?  If so, twilight menu will want to launch with XEGS-DS until those devs switch to the rebranded A8DS. For now you can rename A8DS to match the older XEGS-DS or just try launching A8DS directly from the menu (not a rom… just the emulator - place A8DS.nds in the root directory). 
 

In the next TWL++ release they will catch up with my rebranding and include A8DS as the default.

 

If that's not it, I'll keep thinking!

  • Like 2
Link to comment
Share on other sites

13 hours ago, llabnip said:

Ok. Sounds like you maybe removed XEGS-DS and dropped in A8DS?  If so, twilight menu will want to launch with XEGS-DS until those devs switch to the rebranded A8DS. For now you can rename A8DS to match the older XEGS-DS or just try launching A8DS directly from the menu (not a rom… just the emulator - place A8DS.nds in the root directory). 
 

In the next TWL++ release they will catch up with my rebranding and include A8DS as the default.

 

If that's not it, I'll keep thinking!

Renaming from A8DS.nds to XEGS-DS.ned solved the problem, thanks!

 

I don't think many people will program in the emulator. Anyway in the keyboard

- Atari key returns to menu, real Atari key toggle inverse characters

- I think you cannot keep pressed CTRL therefore you cannot easily move cursor with keys

  • Like 2
Link to comment
Share on other sites

1 hour ago, Philsan said:

Renaming from A8DS.nds to XEGS-DS.ned solved the problem, thanks!

 

I don't think many people will program in the emulator. Anyway in the keyboard

- Atari key returns to menu, real Atari key toggle inverse characters

- I think you cannot keep pressed CTRL therefore you cannot easily move cursor with keys

Glad you got it sorted out! 

 

The Atari Key was repurposed to exit the keyboard mode to the main emulator view since I can't support everything on the single screen. To be honest, we (the keyboard graphic designer with my input) used the ATARI Fuji symbol before we realized that some keyboards actually used that instead of the diagonally-shaded box.  We can change that to some kind of exit button instead ... though I kinda like the look of it.

 

And yes, that's true on the Control key. I'll look into making that more useful/intuitive.

 

And yes, I agree that nobody will use the emulator for programming. It's really designed so you can play Caverns of Mars on the toilet :)  ... but I do want to make it as complete and useful as possible given a limitation of time/effort to work on it.  I always recommend Altirra as the gold standard in emulation - but having a clean portable A8 emulator can still be still a very enjoyable experience especially given how solid the Nintendo DS units are - comfortable to hold and rock-solid d-pad and button engineering.

 

I do appreciate the feedback!

 

 

Edit: I checked in 3.0a with the fix for the Control key handling so it's sticky (until you press CTRL again) plus a few very minor tweaks and cleanups from the rebranding. I also added a new option to set the d-pad to control 'diagonals' to help Q-bert like games so you don't have to press the diagonal directions which are not easy on a d-pad and also for the d-pad to emulate the cursor keys.

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

17 minutes ago, Luke210 said:

I can't save emulator settings (using ndsixl + R4)?

When you're in Settings (via the GEAR icon) you can only save the settings on a per-game basis. That is - you must have a game loaded. 

 

The settings are saved and applied independently for each game. Some games want the 1088K memory. Some want a stock 48K machine. Some want BASIC enabled. Some want OS-A. And key configurations might be different for each game.

 

So there are no 'global settings' - each game gets a default and then when you pick a game, you can save off the settings (including any tweaked screen positions and pixel zooming).

 

image.thumb.png.badbd1b1a687f630205de9bb6d004e43.png

 

When you press START here with a game loaded, it should show you a little 'CFG' message in the upper left that indicates it's saved off the settings for that game (and that game only).

 

I realize this can seem a bit confusing... but the Atari 8-bit world is a multi-faceted beast!

  • Like 2
Link to comment
Share on other sites

7 minutes ago, llabnip said:

When you're in Settings (via the GEAR icon) you can only save the settings on a per-game basis. That is - you must have a game loaded. 

 

The settings are saved and applied independently for each game. Some games want the 1088K memory. Some want a stock 48K machine. Some want BASIC enabled. Some want OS-A. And key configurations might be different for each game.

Oh, that's neat, thanks for the explanation :)

Edited by Luke210
  • Like 1
Link to comment
Share on other sites

Okay... I spent a few hours today putting in some preliminary handling for .CAR files (the ones that have the 16-byte headers). 

 

So far, I just have a rough prototype of the ATARI MAX 1024k handler running. 

image.png.9fc571657d0ec6309d4c094e6c578c82.png

 

However, I'm likely to run out of resources here. The stock DS has 4MB of RAM that is split between the ARM7 and ARM9 processors.

 

With the 1088K support plus the graphical skins and actual program, I'm down to about 1.2MB free.  The cart support took another 1024k (for the largest carts I will support) and now I'm down to about 200k of memory. That's tight and might hamper future expansions.

 

Can I assume with carts, the 1088k system is probably overkill?

 

Would it be acceptable/reasonable to scale back to a 128k XE system (memory-wise) when loading .CAR carts (and still provide the 320K RAMBO and 1088K options for .XEX and .ATR loading)? 

 

 

  • Like 9
  • Thanks 2
Link to comment
Share on other sites

12 hours ago, llabnip said:

 

Would it be acceptable/reasonable to scale back to a 128k XE system (memory-wise) when loading .CAR carts (and still provide the 320K RAMBO and 1088K options for .XEX and .ATR loading)? 

 

 

It's sounds great :)

 

  • Like 1
Link to comment
Share on other sites

GR8's Bomb Jake (Bomb Jack) cartridge works on 64KB machines but it's on Corina cartridge, the dump (at least the one I made) doesn't work even on Altirra.

 

Anyway it's not a problem, on emulators or real hardware we can use XEX version (but 320KB are necessary and we miss high score saving).

 

I don't remember games on cartridge that need more than 64KB RAM.

  • Like 1
Link to comment
Share on other sites

Thanks guys - I appreciate the feedback.  

 

After a day of effort, I just checked in 3.0b with preliminary support for .CAR (with headers) and .ROM (without headers) formats. For now you just click the XEX area and it will let you pick XEX, CAR or ROM files.

 

But it's far from perfect. The main issue is that A8DS is optimized for XE memory banking (using Port B). It's carefully crafted so that the memory access goes through one check to see if we are in the 0x4000 bank and use indirect access. This allows big games that swap memory to run smoothly. 

 

But Cartridge banking is another layer - and it can be different from scheme to scheme (sometimes A000 is banked... sometimes 8000, etc). Adding that logic into the direct memory read handler would cause unacceptable slowdown to all games - many of which are running right at the margins already. As such,  I've had to utilize the 8k memory copy just as Atari800Win does it. It works but for games that swap fast, the poor little handheld can't keep up.  So something like AtariBlast! which runs the XEX at 100fps unthrottled via the 1088K setup will crawl at about 45fps when using the cartridge Atarimax banking scheme. Obviously it's game specific... many carts run fine - including anything that is 16k or smaller.  SpartaDOS X 4.49 seems to run fine. 

 

At this point it would be a fairly significant redesign to try and go with a different memory interface to try and swap pointers vs moving chunks of memory for cart-based handling. I don't know if the juice is worth the squeeze given that most everything got converted to XEX anyway.

 

As far as the exclusives... Space Harrier runs in the mid 50fps and is playable. Flob is full speed but takes a significant time to boot up as it does a lot of swapping before gameplay starts. 

 

A second issue is that my 'guess' routine for .ROM files is kindergarten-level. It assumes 8K and 16K are the standard types. 32K through 512K are considered XEGS type. 1024K is considered Atarimax format.  Obviously .CAR files carry the cart type information and the accuracy is fine there.

 

Lastly - I don't support every type yet. Of the 70+ cart banking schemes, I think I've got 35 of the most popular including all the standard types (8K, 16K), XEGS and SWXEGS, MEGA, Williams, Phoenix, OSS, SDX and ATMAX.  I'll add more as time permits. 

  • Like 4
  • Thanks 1
Link to comment
Share on other sites

https://github.com/wavemotion-dave/A8DS

V3.1 : 08-May-2023 by wavemotion-dave

  • Added CAR and ROM support for the more popular cartridge types up to 1MB. For now use the XEX icon on the main screen which allows you to pick XEX, ROM or CAR files.
  • Added Real-Time Clock support (using the DS Time/Date) for things like SpartaDOS X
  • Added new D-Pad options to support joystick 2 (for games like Wizard of Wor) and diagonals (Q-Bert like games) as well as cursor keys.
  • Improved keyboard handling so CTRL key is now sticky.
  • Improved menu transitions to reduce audio 'pops' as much as possible (there's still one left when loading new games that I'm working on).
  • Auto-rename of XEGS-DS.DAT to A8DS.DAT to match new branding.
  • Squeezed as much into the fast NDS instruction cache (ITCM_CODE) as possible with almost no bytes left to spare.
  • Other cleanups and minor bug fixes as time allowed.

 

Thanks to the Atarians here who have provided kind and meaningful feedback!

  • Like 4
  • Thanks 3
Link to comment
Share on other sites

11 minutes ago, Luke210 said:

I've tested some .car games (lost squadron, laura, prince of persia, onescapee, flob) and they all worked. Flob loads slooowly (i thought emu crashed ;)) but it works in  the end.

Would love to see some pics of these running on the small screen! ;)

Link to comment
Share on other sites

14 minutes ago, Luke210 said:

I've tested some .car games (lost squadron, laura, prince of persia, onescapee, flob) and they all worked. Flob loads slooowly (i thought emu crashed ;)) but it works in  the end.

Yeah, the slow loading is due to the massive bank swaps that are occurring when that game starts.  Maybe I could at least add some kind of indication that it's loading :)

 

Ideally the way to 'fix' that is to not move 8K chunks of memory but to just swap a pointer. But that requires that I check on every memory access if I'm in the swap area and that kills performance across the board. The emulator is optimized to handle XE/PortB memory swaps and not cart banking. So XEX and ATR are still the preferred medium.  I'll work on enhancing CAR/ROM support. 

  • Like 2
  • Thanks 2
Link to comment
Share on other sites

2 minutes ago, Beeblebrox said:

@llabnip Great work. Just wondering, Flob has progress, score and other saved data. Will these be saved? Your emulator supports Atarimax carts which allows this functionality with Atarimax cart versions of Flob, so assume so.

Right now the CART support is preliminary - so I only support the banking of Atarimax carts. I need to dig in on the other features supplied by the format.

  • Thanks 1
Link to comment
Share on other sites

2 minutes ago, llabnip said:

Right now the CART support is preliminary - so I only support the banking of Atarimax carts. I need to dig in on the other features supplied by the format.

Understood. Yeah, games like Flob have various worlds which get unlocked as you play, and losing progress means it's unfeasible to play if you lose everything when you power down and have to start again on the next session.

  • Like 1
Link to comment
Share on other sites

4 minutes ago, Beeblebrox said:

Understood. Yeah, games like Flob have various worlds which get unlocked as you play, and losing progress means it's unfeasible to play if you lose everything when you power down and have to start again on the next session.

Right - I'll definitely look into it. Unfortunately the base emulator I'm using is Atari800 which doesn't seem to have support for it so I'll have to do some digging to figure out how feasible it is to add. 

 

image.png.da5d84cdaa249a46eb588a3d5be984aa.png

 

From Avery's amazing Altirra Hardware Reference manual I see this:

image.thumb.png.114b66def28d74617f8db7c2c6fee537.png

So I suspect that some emulators support it and some don't... right now, A8DS is in the don't category :)

If I can figure it out (and it's feasible to adopt to the handheld), I'll add support.

Link to comment
Share on other sites

55 minutes ago, llabnip said:

Ideally the way to 'fix' that is to not move 8K chunks of memory but to just swap a pointer. But that requires that I check on every memory access if I'm in the swap area and that kills performance across the board.

Without really knowing whats going on, but couldn't you "just" expand the total space in banks to a linear memory space and part of the address is the bank selector which is modified when the selection address changes?

  • Like 1
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...