TI-99/4A on Mister (based on Speccery's)

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, spiny, Greenious, Sorgelig, Moderator Team

GreyRogue
Atari maniac
Atari maniac
Posts: 89
Joined: Thu Mar 22, 2018 3:50 am

TI-99/4A on Mister (based on Speccery's)

Postby GreyRogue » Sat May 12, 2018 5:41 am

I still don't really know what I'm doing, but I've managed to squish the ColecoVision project with the TI-99/4A project by Speccery (Erik Piehl) found here: https://github.com/Speccery/EP994A/tree/soft-cpu.
Because I'm still learning, I thought I'd use the ColecoVision's vdp18 instead of the TMS9918 in Speccery's project, which are the same video chip, and likewise for the SN76489 instead of the TMS9919. Since the ColecoVision was already hooked up to these in Mister I thought it would be easier. I'm not sure if it would be better to use Speccery's instead.
I switched to using my own Multiplier, as the one in Speccery's project is specific to the Xilinx. My multiplier is untested. I guess it would be possible to use the Altera equivalent instead.
The instructions still need cycle counts implemented, and the main clock is in fact running at the wrong frequency as well (the actual TI-99/4A runs on a four phase 3MHz clock.
There are sound glitches, likely related to timing differences, and games might have other glitches as well.
I tried TI-Invaders and it is playable, if not quite exactly right.
Currently, only a single bin file is loaded which contains the BIOS, system GROMs and cartridge ROMs/GROMs. The script to create this is fpga/create-misterrom.cmd. The diskdsr_4000_padded8k.bin file is what it's name suggests. You should be able to replace this with a hole8k instead if desired.
I reduced the core memory size from 1MB to 256KB, which still allows running anything released during the computer's lifetime. I'm using altsyncram, but switching to SDRAM should be straight forward if the full 1MB is wanted (or for porting to MIST).
Files:
https://github.com/greyrogue/ColecoVision_MiSTer/tree/ti994a

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3095
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: TI-99/4A on Mister (based on Speccery's)

Postby Sorgelig » Sat May 12, 2018 10:16 am

Congrats with first your core!
I think it's better to split system ROM from cartridge.

rittwage
Atari freak
Atari freak
Posts: 57
Joined: Sun Jan 05, 2014 6:26 pm

Re: TI-99/4A on Mister (based on Speccery's)

Postby rittwage » Mon May 14, 2018 12:20 am

I could not find the RBF to try, unless it is still named Colecovision?

GreyRogue
Atari maniac
Atari maniac
Posts: 89
Joined: Thu Mar 22, 2018 3:50 am

Re: TI-99/4A on Mister (based on Speccery's)

Postby GreyRogue » Mon May 14, 2018 4:34 am

Sorgelig wrote:Congrats with first your core!
I think it's better to split system ROM from cartridge.

Done. Using the first option will load either just Cart ROM area, or the whole area (including BIOS, etc), depending on the size of the file loaded. I've changed the create-misterrom.cmd to only build the system files. Cart ROMs can now be loaded separately.
Individual Cart ROMs are usually broken into C, D and G parts. These can now be loaded individually as is.
Note that there appears to be an issue with D parts. The core needs to mask the banking writes based on the size, which it currently doesn't. This can be temporarily worked around by creating an alternating CDCDCDCD 64KB image and loading with the C option.
rittwage wrote:I could not find the RBF to try, unless it is still named Colecovision?

I only have the free license and can't build full RBFs, and I don't have an IO Card so I can't test lite builds. I really need to get an IO card; these half hour build-times are killer. If Sorgelig wants to pull this into his repository and build it, that would work for me. Note that most games run too fast. TI-Invaders and Hunt the Wumpus are close to right most of the time, but Shamus runs way to fast (and requires the CDCDCDCD image mentioned above).

Gehstock
Captain Atari
Captain Atari
Posts: 331
Joined: Wed Dec 21, 2016 7:18 pm
Location: Germany

Re: TI-99/4A on Mister (based on Speccery's)

Postby Gehstock » Mon May 14, 2018 7:01 am

Have Just Compile it, nothing is changed or tested
Desktop.rar
You do not have the required permissions to view the files attached to this post.

brunosilva
Atari User
Atari User
Posts: 31
Joined: Mon Apr 09, 2018 10:58 pm

Re: TI-99/4A on Mister (based on Speccery's)

Postby brunosilva » Sun May 20, 2018 8:54 pm

@GreyRogue - i'm trying some bin roms that i have... but its not working...

where can i research more about this?

Thanks

GreyRogue
Atari maniac
Atari maniac
Posts: 89
Joined: Thu Mar 22, 2018 3:50 am

Re: TI-99/4A on Mister (based on Speccery's)

Postby GreyRogue » Sun May 20, 2018 11:34 pm

I've made several improvements to the core. I've added instruction cycle counts, so most games should run close to correct timing. Currently using 3.047MHz (42.66MHz/14) clock instead of 3MHz, but it's close. This did fix the audio glitches as expected. You can also turn on Turbo mode, if you aren't playing games that care about timing and want it to run fast.
Anybody looking for some games to try out, here are some of my favorites:
-Parsec: Side scrolling shoot-em-up. Need the speech synthesizer for the full experience, but still fun. Number keys 1-3 control vertical speed (needed for fueling tunnels).
-Munchman: Pac-man clone. Faster and better than Pac-Man IMHO.
-Shamus: Berzerk clone set in a maze with an end goal. Released on several consoles.
-Hunt the Wumpus: Minesweeper type puzzle game. All caverns within two spaces of the Wumpus have blood (red) spots. All caverns within one space of the two swamp pits have a green outline.
-TI-Invaders: Self-explanatory.
-Hopper: Simple little action game. Make your kangaroo punch the boxes to trap the trappers.
-Blasto: Tank/minefield for up to 2 players.
-Tombstone City: Tank style game. Groups of 2 cacti produce enemies. Shoot the enemies to create more cacti. Groups of 3 cacti disappear. Clear all groups of 2 to clear stages (days).
There are also versions of many of the arcade port games released for many systems at the time (Donkey Kong, Pac-Man, Frogger, etc).

brunosilva wrote:@GreyRogue - i'm trying some bin roms that i have... but its not working...

where can i research more about this?

Thanks

Any specifics on the ROMs? Are you using the latest version? What types are the ROMs? Size?
The core currently only supports 64KB of cart ROM, which I thought was big enough to run anything released in the 1980s. I'm currently using less than 300KB of altsyncram, so I could double everything easily without issue (assuming things like HDMI and other built in things aren't using too much of it). If 256KB (or maybe 512KB) is needed, I'd have to rearrange some things.

The other option is to switch to using the SDRAM board, but I haven't looked into how that works. If there were an existing vhd or verilog file that converted it into something like PSRAM that would be helpful. I guess I could just copy the NES code, but I'm uncertain of the timing requirements and haven't had time to look at it. I think it should be possible to have an option to switch between altsyncram and the SDRAM board, but I haven't looked closely at that either.

By the way, the usage should be:
Load the base TI system bios roms using the first option from the OSD. This file can be created from the create-misterrom.cmd file (should be 192KB [196608]).
These two can be done in any order:
-Load any *G.bin with that option
-Load any cart ROMs (*C.bin) with the first option (currently must be less than 64KB).
Finally load a *D.bin file if using one.

If the C.bin file is bigger than 8KB, you might need to repeat it to fill out the full 64KB for banking/masking purposes. (You'd need to do this before transferring the file to the core). You could modify the create-misterrom.cmd to do this for you. Basically it's just filling in the altsyncram, which is formatted like this:
0x00000-0x0FFFF (64KB) = Cart ROM (C and D ROMs would occupy the first 16KB). Loading the first option just starts filling from the beginning regardless of size, which is why loading the 192KB system image works (it just fills in everything). If you load the *D.bin option last, the first 16KB will be mirrored for the full 64KB.
0x10000-0x1FFFF (64KB) = GROMs (System GROMs occupy the first 24KB). Loading from the G option fills in starting after the first 24KB (room for 40KB Cart GROMs). Now that cycle timing is implemented, you could use the original versions of the System GROMs instead of the Speccery modified ones. He just changed them to eliminate keyboard typing repeat (which didn't work well at Turbo speeds).
0x20000-0x2FFFF (64KB) = DSRs (Floppy Disk Controllers, etc.) Scratchpad RAM, and System BIOS ROM are here.
0x30000-0x3FFFF (64KB) = System Expansion RAM. 32KB expansion RAMs were available at the time. If you make images larger than 192KB, they will fill this in as well.

brunosilva
Atari User
Atari User
Posts: 31
Joined: Mon Apr 09, 2018 10:58 pm

Re: TI-99/4A on Mister (based on Speccery's)

Postby brunosilva » Mon May 21, 2018 8:40 pm

@greyRogue

thanks for the answer... i also can't compile and i'm using the version from @Gehstock

i think your repo is here? https://github.com/greyrogue/ColecoVisi ... ree/ti994a here is that create-misterrom.cmd file?

about the roms i'm testing you can check them here: https://mega.nz/#!LVVGkRRa!Kbs9CONFbK5a ... S-tew1f3i8

but because i'm not doing it right... they didnt work (they work in emulators)
Thanks

NML32
Atari Super Hero
Atari Super Hero
Posts: 545
Joined: Tue Mar 11, 2014 1:54 am
Location: USA/Florida

Re: TI-99/4A on Mister (based on Speccery's)

Postby NML32 » Mon May 21, 2018 8:53 pm

GreyRogue wrote:By the way, the usage should be:
Load the base TI system bios roms using the first option from the OSD. This file can be created from the create-misterrom.cmd file (should be 192KB [196608]).


I'm not sure what I'm doing wrong. The core boots up to a blank screen and when I load tiroms.bin from the first option in the OSD nothing happens. Should I see the TI-99/4A boot up screen?

Also, after running create-misterrom.cmd my tiroms.bin is 184KB not 192KB.

GreyRogue
Atari maniac
Atari maniac
Posts: 89
Joined: Thu Mar 22, 2018 3:50 am

Re: TI-99/4A on Mister (based on Speccery's)

Postby GreyRogue » Mon May 21, 2018 9:20 pm

NML32 wrote:
GreyRogue wrote:By the way, the usage should be:
Load the base TI system bios roms using the first option from the OSD. This file can be created from the create-misterrom.cmd file (should be 192KB [196608]).


I'm not sure what I'm doing wrong. The core boots up to a blank screen and when I load tiroms.bin from the first option in the OSD nothing happens. Should I see the TI-99/4A boot up screen?

Also, after running create-misterrom.cmd my tiroms.bin is 184KB not 192KB.
brunosilva wrote:@greyRogue

thanks for the answer... i also can't compile and i'm using the version from @Gehstock

i think your repo is here? https://github.com/greyrogue/ColecoVisi ... ree/ti994a here is that create-misterrom.cmd file?

but because i'm not doing it right... they didnt work (they work in emulators)
Thanks

That is the correct cmd file.
Do you have the 994aROM.bin file in your firmware directory? If you're missing it, the file will be 184KB. You should see the TI title screen after loading that file. Then you load whatever game you want like I described above. If using the Gehstock build you need to create a CDCDCDCD bin file if using d.bin files. That's basically just copy /b filec.bin + /b filed.bin + /b filec.bin +/b filed.bin + /b filec.bin + /b filed.bin + /b filec.bin + /b filed.bin out.bin, which is loaded with the c option. This is a 64KB file.

NML32
Atari Super Hero
Atari Super Hero
Posts: 545
Joined: Tue Mar 11, 2014 1:54 am
Location: USA/Florida

Re: TI-99/4A on Mister (based on Speccery's)

Postby NML32 » Mon May 21, 2018 9:37 pm

Thanks, I didn't have the 994arom.bin
I'll give it a try.
Last edited by NML32 on Tue May 22, 2018 9:29 am, edited 1 time in total.

brunosilva
Atari User
Atari User
Posts: 31
Joined: Mon Apr 09, 2018 10:58 pm

Re: TI-99/4A on Mister (based on Speccery's)

Postby brunosilva » Mon May 21, 2018 10:00 pm

well... its working...

i cannot make the roms in that zip work but i got other roms to work :)

its not possible to the core read by default tiroms.bin ? other mister cores can do this using two or three files for filename and path :)

NML32
Atari Super Hero
Atari Super Hero
Posts: 545
Joined: Tue Mar 11, 2014 1:54 am
Location: USA/Florida

Re: TI-99/4A on Mister (based on Speccery's)

Postby NML32 » Mon May 21, 2018 11:14 pm

GreyRogue, thanks it's working now. :cheers:

NML32
Atari Super Hero
Atari Super Hero
Posts: 545
Joined: Tue Mar 11, 2014 1:54 am
Location: USA/Florida

Re: TI-99/4A on Mister (based on Speccery's)

Postby NML32 » Tue May 22, 2018 3:13 am

I'm very happy to see the TI-99/4a being ported to MiSTer. :D

I recorded some gameplay.

https://youtu.be/0QUxya-WcEc

brunosilva
Atari User
Atari User
Posts: 31
Joined: Mon Apr 09, 2018 10:58 pm

Re: TI-99/4A on Mister (based on Speccery's)

Postby brunosilva » Tue May 22, 2018 9:19 am

where can i find instructions to compile the code for mister?

thanks

GreyRogue
Atari maniac
Atari maniac
Posts: 89
Joined: Thu Mar 22, 2018 3:50 am

Re: TI-99/4A on Mister (based on Speccery's)

Postby GreyRogue » Tue May 22, 2018 10:26 pm

brunosilva wrote:where can i find instructions to compile the code for mister?

thanks

First open the qpf file with Quartus.
https://github.com/MiSTer-devel/Main_MiSTer/wiki/Core-porting-notes
Note to open the QSYS file mentioned in the full/lite section, the version of Quartus I downloaded was named Platform Designer in the Tools menu. After generating the qsys file, it's just the Start Compilation button.

https://github.com/MiSTer-devel/Main_MiSTer/wiki/USB-Blaster-(debugging)
Make sure you have a USB cable connected to the USB Blaster port if you want to program it.
In the Programmer dialog, Select the USB interface from the Hardware Setup button.
Then choose Auto Detect. The 5CSEBA6 selection works for me. Select the 5CSEBA6, and choose Change File. The SOF file will be in the output_files directory. Check the Program/Configure checkbox and finally the Start button.

uigiflip
Atariator
Atariator
Posts: 27
Joined: Sun May 13, 2018 6:41 pm

Re: TI-99/4A on Mister (based on Speccery's)

Postby uigiflip » Wed May 23, 2018 3:19 pm

how do you create the system rom?
Vampire 500 V2+, Mister, FPGA Replay + 68060 Daughterboard

brunosilva
Atari User
Atari User
Posts: 31
Joined: Mon Apr 09, 2018 10:58 pm

Re: TI-99/4A on Mister (based on Speccery's)

Postby brunosilva » Wed May 23, 2018 3:43 pm

@uigiflip - in fpga folder (i think) of the repository you have the .cmd to create the rom... edit the .cmd to check the files needed and google the files missing :)

uigiflip
Atariator
Atariator
Posts: 27
Joined: Sun May 13, 2018 6:41 pm

Re: TI-99/4A on Mister (based on Speccery's)

Postby uigiflip » Wed May 23, 2018 9:01 pm

found it just dont know which rom is hole8k, hole48k and hole32k etc
Vampire 500 V2+, Mister, FPGA Replay + 68060 Daughterboard

NML32
Atari Super Hero
Atari Super Hero
Posts: 545
Joined: Tue Mar 11, 2014 1:54 am
Location: USA/Florida

Re: TI-99/4A on Mister (based on Speccery's)

Postby NML32 » Wed May 23, 2018 9:19 pm

uigiflip wrote:found it just dont know which rom is hole8k, hole48k and hole32k etc

The only file I was missing was 994aROM.bin and it goes in the firmware directory.
Then run create-misterrom.cmd located in the FPGA folder.

uigiflip
Atariator
Atariator
Posts: 27
Joined: Sun May 13, 2018 6:41 pm

Re: TI-99/4A on Mister (based on Speccery's)

Postby uigiflip » Wed May 23, 2018 9:20 pm

found them in same place has create mister rom
Vampire 500 V2+, Mister, FPGA Replay + 68060 Daughterboard

uigiflip
Atariator
Atariator
Posts: 27
Joined: Sun May 13, 2018 6:41 pm

Re: TI-99/4A on Mister (based on Speccery's)

Postby uigiflip » Wed May 23, 2018 9:23 pm

are running the cmd file inwindows or linux?

also where is the firmware folder?
Vampire 500 V2+, Mister, FPGA Replay + 68060 Daughterboard

GreyRogue
Atari maniac
Atari maniac
Posts: 89
Joined: Thu Mar 22, 2018 3:50 am

Re: TI-99/4A on Mister (based on Speccery's)

Postby GreyRogue » Wed May 23, 2018 9:24 pm

uigiflip wrote:found it just dont know which rom is hole8k, hole48k and hole32k etc

Those are just files filled with 00s of the size expected. If you pulled the entire repository, you can run the cmd where it is and it will find them (they're in the same directory as the cmd file). The only system Roms currently used are 994aROM.bin and either 994AGROM.bin or 994AGROM-EP.bin depending on if you want held keyboard key repeat or not.
Adding additional peripherals would require more files, though.

uigiflip
Atariator
Atariator
Posts: 27
Joined: Sun May 13, 2018 6:41 pm

Re: TI-99/4A on Mister (based on Speccery's)

Postby uigiflip » Wed May 23, 2018 9:30 pm

GreyRogue wrote:
uigiflip wrote:found it just dont know which rom is hole8k, hole48k and hole32k etc

Those are just files filled with 00s of the size expected. If you pulled the entire repository, you can run the cmd where it is and it will find them (they're in the same directory as the cmd file). The only system Roms currently used are 994aROM.bin and either 994AGROM.bin or 994AGROM-EP.bin depending on if you want held keyboard key repeat or not.
Adding additional peripherals would require more files, though.



thanks thats done it
Vampire 500 V2+, Mister, FPGA Replay + 68060 Daughterboard

uigiflip
Atariator
Atariator
Posts: 27
Joined: Sun May 13, 2018 6:41 pm

Re: TI-99/4A on Mister (based on Speccery's)

Postby uigiflip » Wed May 23, 2018 9:33 pm

going to test tomorrow after windows 98 se finishes installing on a0486 core
Vampire 500 V2+, Mister, FPGA Replay + 68060 Daughterboard


Return to “MiSTer”

Who is online

Users browsing this forum: No registered users and 4 guests