Topic Options
#80482 - 07/12/12 11:04 PM ti99: Changes for cartridge handling
mizapf Offline
Senior Member

Registered: 05/10/07
Posts: 432
Loc: Germany
Hi to all TI-99 users,

I just completed a re-write of the cartridge slot system of the TI consoles. There are no new features but this is a long-due cleanup of the complex code that attempted to incorporate all features in itself.

From now on we have three slot options "single" (default), "multi", and "gkracker". When the cartridge port (aka gromport) is set to single, only "cart" is offered to mount a cartridge. For "multi", cart1, 2, 3, and 4 are available. gkracker offers a single own "cart" (where the cartridge to be dumped is plugged into).

With this rewrite I was finally able to remove a lot of emulation magic from the gromport by creating these different slot devices. Anyway, the real console has only one slot, and extenders were needed to get more slots. So this is now properly reflected in the emulation. You get the additional slots only when the extender is plugged in.

Example
Code:
mess ti99_4a -gromport single -cart extended_basic.rpk

mess ti99_4a -cart extended_basic.rpk


versus

Code:
mess ti99_4a -gromport multi -cart1 extended_basic.rpk -cart2 ti_invaders.rpk


RPK and softlist are both available, you can take cartridges from either one, even mixed in the multi expander. The softlist still needs some more entries; until then you need to use the RPKs.

The GRAM Kracker device now loads its ROM from a zip file ti99_gkracker.zip in the rompath (so no more pseudo cartridge). It stores the NVRAM contents in the nvram/ti99* folder as gromport_gkracker.

There is a configuration option to enable or inhibit a system reset when plugging in a cartridge. For the previous implementation an emulator reset was mandatory because of the runtime addition of PCB devices. This is not necessary anymore since the PCBs are now modeled as simple C++ objects, thus removing this emulation artifact.

Michael

Top
#80483 - 07/13/12 03:06 AM Re: ti99: Changes for cartridge handling [Re: mizapf]
R. Belmont Online   content
Very Senior Member

Registered: 03/17/01
Posts: 13172
Loc: USA
Yeah, about this:

Code:
src/mess/machine/ti99/gromport.c: In member function ‘virtual void ti99_cartridge_device::call_unload()’:
src/mess/machine/ti99/gromport.c:1253:9: error: deleting object of polymorphic class type ‘ti99_cartridge_pcb’ which has non-virtual destructor might cause undefined behaviour (-Werror=delete-non-virtual-dtor)


That's GCC 4.7.0 on Linux.

Top
#80484 - 07/13/12 10:47 AM Re: ti99: Changes for cartridge handling [Re: mizapf]
mizapf Offline
Senior Member

Registered: 05/10/07
Posts: 432
Loc: Germany
Er ... I still have gcc 4.6.2, no 4.7 in my openSUSE repos yet.

So would it help to declare the destructor of ti99_cartridge_pcb as virtual and add destructors for each subclass?

I think this is a precautious and general error message; the subclasses here mainly differ by implementation, not by state. (Anyway, says "might".)

Michael
(still loving Java)

Top
#80485 - 07/13/12 02:03 PM Re: ti99: Changes for cartridge handling [Re: mizapf]
Vas Crabb Offline
Very Senior Member

Registered: 02/08/04
Posts: 1381
Loc: Sydney, Australia
You only need to declare a virtual destructor on the base class. Derived classes implicitly get default virtual destructors generated if the base destructor is virtual.

Top
#80486 - 07/13/12 02:07 PM Re: ti99: Changes for cartridge handling [Re: mizapf]
mizapf Offline
Senior Member

Registered: 05/10/07
Posts: 432
Loc: Germany
Too late, already added the destructors. smile

Try to recompile now. My gcc 4.6.2 does not seem to know this parameter, so I don't see a difference.

Michael

Top
#80487 - 07/13/12 02:44 PM Re: ti99: Changes for cartridge handling [Re: mizapf]
R. Belmont Online   content
Very Senior Member

Registered: 03/17/01
Posts: 13172
Loc: USA
Looks good on 4.7 now, thanks smile

Top


Who's Online
8 registered (Firehawke, Kaylee, R. Belmont, Haze, any, madmoose, ASH, etabeta78), 21 Guests and 1 Spider online.
Key: Admin, Global Mod, Mod
Shout Box

Forum Stats
4345 Members
9 Forums
7228 Topics
87127 Posts

Max Online: 183 @ 03/06/12 06:21 PM