1# FSGS - Common functionality for Fengestad Game System.
2# Copyright (C) 2013  Frode Solheim <frode-code@fengestad.no>
3#
4# This program is free software; you can redistribute it and/or modify it
5# under the terms of the GNU General Public License as published by the Free
6# Software Foundation; either version 2 of the License, or (at your option)
7# any later version.
8#
9# This program is distributed in the hope that it will be useful, but WITHOUT
10# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
12# more details.
13#
14# You should have received a copy of the GNU General Public License along
15# with this program; if not, write to the Free Software Foundation, Inc.,
16# 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17
18from fsgs.platform import PlatformHandler
19from fsgs.platforms.cpc.messcpcdriver import MessCpcDriver
20from .loader import SimpleLoader
21
22
23class AmstradCPCPlatformHandler(PlatformHandler):
24
25    PLATFORM_NAME = "Amstrad CPC"
26
27    def __init__(self):
28        PlatformHandler.__init__(self)
29
30    def get_loader(self, fsgs):
31        return AmstradCPCLoader(fsgs)
32
33    def get_runner(self, fsgs):
34        return MessCpcDriver(fsgs)
35
36
37class AmstradCPCLoader(SimpleLoader):
38    pass
39
40    # def load_files(self, values):
41    #     file_list = json.loads(values["file_list"])
42    #     #assert len(file_list) == 1
43    #     if file_list[0]["name"].endswith(".tap"):
44    #         self.config["tape_drive"] = "sha1://{0}/{1}".format(
45    #             file_list[0]["sha1"], file_list[0]["name"])
46