Jump to content
IGNORED

New emulator - BuLWiP


PeteE

Recommended Posts

15 hours ago, mr_gw454 said:

I did try to compile this on my Linux Mint 20.1 system but ran into an error:

Looks like it might be related to my version of SDL2? 2.0.10.

Yes, SDL_LockTextureToSurface was added in 2.0.12.  I think I can avoid calling that function.

19 hours ago, TheMole said:

Here's an example cart image and the output from objdump with (some) C code interspersed... For some reason there's large swaths of asm code without C code, but that's probably because I'm including a library that hasn't been compiled/built with the right C flags. Should still work for testing if this type of list format can be made to work with you debugger though...

 

Oh, and the program itself assumes 80 column text mode on an F18A, so won't run correctly in the emulator... I hope that's not an issue for you. I just picked a small-ish project I had lying around.

malloctest8.bin 32 kB · 3 downloads malloctest8.lst 118.18 kB · 1 download

Looks like the listing parser handled it okay.  When the function loads a listing it prints out the segments that it found:

load listing test/malloctest8.lst
list 0-555 pc=6000-6014 bank -1
list 555-55886 pc=2080-2fce bank -1
list 55886-121015 pc=6f6a-7c50 bank 0

The list shows the file offset range and the program counter address range, as well as the assumed bank.  Bank -1 means all banks.  To detect the bank number in GCC listings, it looks for the text "Disassembly of section .bank" followed by the bank number.  I think you have to set this name in your linker script, like this (taken from fcmd)  You probably know about banking in GCC better than I do.

 

  /* overlays */
  OVERLAY : AT (0x10000)
  {
    .bank0 {             /* list the set of modules in bank 0 */
      objects/api.o(.text)
      objects/b0_*.o(.text)
      __LOAD_DATA = .;   /* .data segment is appended here by makefile for final ROM .bin */
    }
    .bank15 { objects/b15_*.o(.text) }  
    .bank14 { objects/b14_*.o(.text) }  
    .bank13 { objects/b13_*.o(.text) }  
    .bank12 { objects/b12_*.o(.text) }  
    .bank11 { objects/b11_*.o(.text) }  
    .bank10 { objects/b10_*.o(.text) }  
    .bank9 { objects/b9_*.o(.text) }  
    .bank8 { objects/b8_*.o(.text) }  
    .bank7 { objects/b7_*.o(.text) }  
    .bank6 { objects/b6_*.o(.text) }  
    .bank5 { objects/b5_*.o(.text) }  
    .bank4 { objects/b4_*.o(.text) }  
    .bank3 { objects/b3_*.o(.text) }  
    .bank2 { objects/b2_*.o(.text) }  
    .bank1 { objects/b1_*.o(.text) }  
  } >bank_rom

 

 

13 hours ago, apersson850 said:

Like this?

Exactly!

Edited by PeteE
  • Like 2
Link to comment
Share on other sites

I pushed some changes to the github repo. The alternate debug key is F12. Use Shift-Insert to paste from the clipboard. Find keys are added. The SDL functions should work on SDL 2.0.10, as well as fixed the CRT filter on Mac, and also added 80-column text mode just for fun.

 

EDIT: Also fixes the bug with XB.  I forgot the post increment on CB instruction.

Edited by PeteE
  • Like 2
Link to comment
Share on other sites

On 3/3/2023 at 11:55 AM, PeteE said:

Yes, SDL_LockTextureToSurface was added in 2.0.12.  I think I can avoid calling that function.

 

I just pulled the latest updates and it now compiles for me (including the Raspberry Pi (ARM).  

image.thumb.png.889921067ef0d8ad3c7bdff6c48538a3.png

 

Thank you very much for making that SDL LockTextureToSurface change.

 

 

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...
30 minutes ago, arcadeshopper said:

Wonder if that's why Donkey Kong is so fast too.. probably 

Found the bug: expansion RAM accesses are not adding their cycle time (2 cycles + 4 for the multiplexer), so they're effectively faster than scratchpad RAM.  Whoops.

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

  • 4 weeks later...

I checked in the instruction cycle count fixes, at least for the instructions I care about.  If there's others, I don't want to know about it.  I made an automated test using XAS99 to generate various combinations of instructions with normal or multiplexed memory addresses, and used the "s+","s-","d+","d-" memory access speed annotations so that the cycle counts in the listing were accurate.  My test harness loads the binary, single steps through it sequentially, and compares the cycles executed to that instruction in the listing.

  • Like 5
Link to comment
Share on other sites

  • 11 months later...

Compiled fine on my Mint system (once I installed SDL lib!) - it's asking for the rom files - 

Failed to load ROM/GROM files: 994arom.bin 994agrom.bin

Any pointers? Thanks

 

Mark

  • Like 1
Link to comment
Share on other sites

4 hours ago, Willsy said:

Compiled fine on my Mint system (once I installed SDL lib!) - it's asking for the rom files - 

Failed to load ROM/GROM files: 994arom.bin 994agrom.bin

Any pointers? Thanks

 

Mark

They can be gotten from here https://ftp.whtech.com/System ROMs/MAME/pre_0.174/ti99_complete.zip nested inside the ti99_4a.zip

  • Like 2
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...